be.SIRAPRISE.client.jsba
Class ConstrainedType

java.lang.Object
  extended by be.SIRAPRISE.client.jsba.AbstractDBObject
      extended by be.SIRAPRISE.client.jsba.AbstractUpdatableDBObject
          extended by be.SIRAPRISE.client.jsba.ConstrainedType
All Implemented Interfaces:
ConstrainedtypeToDBObject, DBObject, DBObjectToConstrainedtype, UpdatableDBObject

public final class ConstrainedType
extends AbstractUpdatableDBObject
implements DBObjectToConstrainedtype, ConstrainedtypeToDBObject

Author:
Erwin Smout

Constructor Summary
ConstrainedType()
          Creates an empty ConstrainedType
ConstrainedType(java.lang.String typeName, java.lang.String baseTypeName, java.lang.String expression)
          Creates the ConstrainedType
 
Method Summary
 java.lang.String getBaseTypeName()
          Gets The base type's name
 java.lang.String getConstrainedtypeBasetype()
          Gets the basetype for constrainedtype
 java.lang.String getConstrainedtypeSp_expression()
          Gets the expression for constrainedtype
 java.lang.String getConstrainedtypeTypename()
          Gets the typename for constrainedtype
 java.lang.String getExpression()
          Gets The constraint expression
 UpdatableDBObject getPreUpdateState()
          Gets The state of the object as it was built by the J/R bridging engine immediately after the object was created from a database tuple (and which should have been set by/using the setPreUpdateState() method.
 java.lang.String getTypeName()
          Gets The type name
 void setBasetypeFromDB(java.lang.String basetype)
          Sets basetype from the DB
 void setBaseTypeName(java.lang.String baseTypeName)
          Sets The base type's name
 void setExpression(java.lang.String expression)
          Sets The constraint expression
 void setPreUpdateState()
          This method is called by the J/R bridging engine after an object has been setup from some tuple retrieved from the database.
 void setSp_expressionFromDB(java.lang.String expression)
          Sets expression from the DB
 void setTypeName(java.lang.String typeName)
          Sets The type name
 void setTypenameFromDB(java.lang.String typeName)
          Sets typename from the DB
 
Methods inherited from class be.SIRAPRISE.client.jsba.AbstractUpdatableDBObject
dbUpdateCommand, dbUpdateCommand
 
Methods inherited from class be.SIRAPRISE.client.jsba.AbstractDBObject
dbAddCommand, dbAddCommand, dbAddCommand, dbAddCommandAll, dbAssertCommand, dbAssertCommand, dbAssertCommand, dbAssertCommandAll, dbDeleteCommand, dbDeleteCommand, dbDeleteCommand, dbDeleteCommandAll, dbUnAssertCommand, dbUnAssertCommand, dbUnAssertCommand, dbUnAssertCommandAll
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstrainedType

public ConstrainedType()
Creates an empty ConstrainedType


ConstrainedType

public ConstrainedType(java.lang.String typeName,
                       java.lang.String baseTypeName,
                       java.lang.String expression)
Creates the ConstrainedType

Parameters:
typeName - The type name
baseTypeName - The constraint message text to be displayed in the event of violations
expression - The file name
Method Detail

getBaseTypeName

public final java.lang.String getBaseTypeName()
Gets The base type's name

Returns:
The base type's name

getConstrainedtypeBasetype

public java.lang.String getConstrainedtypeBasetype()
Description copied from interface: DBObjectToConstrainedtype
Gets the basetype for constrainedtype

Specified by:
getConstrainedtypeBasetype in interface DBObjectToConstrainedtype
Returns:
The basetype for constrainedtype

getConstrainedtypeSp_expression

public java.lang.String getConstrainedtypeSp_expression()
Description copied from interface: DBObjectToConstrainedtype
Gets the expression for constrainedtype

Specified by:
getConstrainedtypeSp_expression in interface DBObjectToConstrainedtype
Returns:
The expression for constrainedtype

getConstrainedtypeTypename

public java.lang.String getConstrainedtypeTypename()
Description copied from interface: DBObjectToConstrainedtype
Gets the typename for constrainedtype

Specified by:
getConstrainedtypeTypename in interface DBObjectToConstrainedtype
Returns:
The typename for constrainedtype

getExpression

public final java.lang.String getExpression()
Gets The constraint expression

Returns:
The constraint expression.

getPreUpdateState

public final UpdatableDBObject getPreUpdateState()
Description copied from interface: UpdatableDBObject
Gets The state of the object as it was built by the J/R bridging engine immediately after the object was created from a database tuple (and which should have been set by/using the setPreUpdateState() method.

Specified by:
getPreUpdateState in interface UpdatableDBObject
Returns:
The state of the object as it was built by the J/R bridging engine immediately after the object was created from a database tuple (and which should have been set by/using the setPreUpdateState() method.

getTypeName

public final java.lang.String getTypeName()
Gets The type name

Returns:
The type name.

setBasetypeFromDB

public void setBasetypeFromDB(java.lang.String basetype)
Description copied from interface: ConstrainedtypeToDBObject
Sets basetype from the DB

Specified by:
setBasetypeFromDB in interface ConstrainedtypeToDBObject
Parameters:
basetype - The DB value for basetype

setBaseTypeName

public final void setBaseTypeName(java.lang.String baseTypeName)
Sets The base type's name

Parameters:
baseTypeName - The baseTypeName to set.

setExpression

public final void setExpression(java.lang.String expression)
Sets The constraint expression

Parameters:
expression - The expression to set.

setSp_expressionFromDB

public void setSp_expressionFromDB(java.lang.String expression)
Description copied from interface: ConstrainedtypeToDBObject
Sets expression from the DB

Specified by:
setSp_expressionFromDB in interface ConstrainedtypeToDBObject
Parameters:
expression - The DB value for expression

setPreUpdateState

public final void setPreUpdateState()
Description copied from interface: UpdatableDBObject
This method is called by the J/R bridging engine after an object has been setup from some tuple retrieved from the database. The method must cause the object to save a copy (/clone) of all the fields that are pertinent to the database. This copy will be retrieved by the J/R bridging engine using the getPreUpdateState() method call, and will subsequently be used by the J/R bridging engine to determine which fields have changed value, and thus to determine which attributes need to be updated in the database.

Specified by:
setPreUpdateState in interface UpdatableDBObject

setTypeName

public final void setTypeName(java.lang.String typeName)
Sets The type name

Parameters:
typeName - The typeName to set.

setTypenameFromDB

public void setTypenameFromDB(java.lang.String typeName)
Description copied from interface: ConstrainedtypeToDBObject
Sets typename from the DB

Specified by:
setTypenameFromDB in interface ConstrainedtypeToDBObject
Parameters:
typeName - The DB value for typename