be.SIRAPRISE.client.jsba
Class DatabaseConstraint

java.lang.Object
  extended by be.SIRAPRISE.client.jsba.AbstractDBObject
      extended by be.SIRAPRISE.client.jsba.AbstractUpdatableDBObject
          extended by be.SIRAPRISE.client.jsba.DatabaseConstraint
All Implemented Interfaces:
ConstraintmessagetextToDBObject, DatabaseconstraintToDBObject, DBObject, DBObjectToConstraintmessagetext, DBObjectToDatabaseconstraint, UpdatableDBObject

public final class DatabaseConstraint
extends AbstractUpdatableDBObject
implements DBObjectToDatabaseconstraint, DatabaseconstraintToDBObject, ConstraintmessagetextToDBObject, DBObjectToConstraintmessagetext

Author:
Erwin

Constructor Summary
DatabaseConstraint()
          Creates the DatabaseConstraint
DatabaseConstraint(long errorCode, java.lang.String expression, java.lang.String label, java.lang.String messageText)
          Creates the DatabaseConstraint
 
Method Summary
 java.lang.String getConstraintmessagetextConstraintmessagetext()
          Gets the constraintmessagetext for constraintmessagetext
 java.lang.String getConstraintmessagetextErrorcode()
          Gets the errorcode for constraintmessagetext
 java.lang.String getDatabaseconstraintConstraintlabel()
          Gets the constraintlabel for databaseconstraint
 java.lang.String getDatabaseconstraintErrorcode()
          Gets the errorcode for databaseconstraint
 java.lang.String getDatabaseconstraintSp_expression()
          Gets the constraintexpression for databaseconstraint
 long getErrorCode()
          Gets errorCode
 java.lang.String getExpression()
          Gets expression
 java.lang.String getLabel()
          Gets label
 java.lang.String getMessageText()
          Gets messageText
 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.
 void setConstraintlabelFromDB(java.lang.String constraintlabel)
          Sets constraintlabel from the DB
 void setConstraintmessagetextFromDB(java.lang.String constraintmessagetext)
          Sets constraintmessagetext from the DB
 void setErrorCode(long errorCode)
          Sets errorCode
 void setErrorcodeFromDB(java.lang.String errorcode)
          Sets errorcode from the DB
 void setExpression(java.lang.String expression)
          Sets expression
 void setLabel(java.lang.String label)
          Sets label
 void setMessageText(java.lang.String messageText)
          Sets messageText
 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 constraintexpression)
          Sets constraintexpression from the DB
 DmlAssignmentCommand smartUpdateComand()
          Gets a "smart" update command that brings the catalog from the state reflected in preUpdateState, to the current state.
 
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

DatabaseConstraint

public DatabaseConstraint()
Creates the DatabaseConstraint


DatabaseConstraint

public DatabaseConstraint(long errorCode,
                          java.lang.String expression,
                          java.lang.String label,
                          java.lang.String messageText)
Creates the DatabaseConstraint

Parameters:
errorCode -
expression -
label -
messageText - the corresponding messagetext to be generated upon violations of the constraint. null or a dash ("-") means "none".
Method Detail

getConstraintmessagetextConstraintmessagetext

public java.lang.String getConstraintmessagetextConstraintmessagetext()
Description copied from interface: DBObjectToConstraintmessagetext
Gets the constraintmessagetext for constraintmessagetext

Specified by:
getConstraintmessagetextConstraintmessagetext in interface DBObjectToConstraintmessagetext
Returns:
The constraintmessagetext for constraintmessagetext

getConstraintmessagetextErrorcode

public java.lang.String getConstraintmessagetextErrorcode()
Description copied from interface: DBObjectToConstraintmessagetext
Gets the errorcode for constraintmessagetext

Specified by:
getConstraintmessagetextErrorcode in interface DBObjectToConstraintmessagetext
Returns:
The errorcode for constraintmessagetext

getDatabaseconstraintConstraintlabel

public java.lang.String getDatabaseconstraintConstraintlabel()
Description copied from interface: DBObjectToDatabaseconstraint
Gets the constraintlabel for databaseconstraint

Specified by:
getDatabaseconstraintConstraintlabel in interface DBObjectToDatabaseconstraint
Returns:
The constraintlabel for databaseconstraint

getDatabaseconstraintErrorcode

public java.lang.String getDatabaseconstraintErrorcode()
Description copied from interface: DBObjectToDatabaseconstraint
Gets the errorcode for databaseconstraint

Specified by:
getDatabaseconstraintErrorcode in interface DBObjectToDatabaseconstraint
Returns:
The errorcode for databaseconstraint

getDatabaseconstraintSp_expression

public java.lang.String getDatabaseconstraintSp_expression()
Description copied from interface: DBObjectToDatabaseconstraint
Gets the constraintexpression for databaseconstraint

Specified by:
getDatabaseconstraintSp_expression in interface DBObjectToDatabaseconstraint
Returns:
The constraintexpression for databaseconstraint

getErrorCode

public final long getErrorCode()
Gets errorCode

Returns:
errorCode.

getExpression

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

Returns:
expression.

getLabel

public final java.lang.String getLabel()
Gets label

Returns:
label.

getMessageText

public final java.lang.String getMessageText()
Gets messageText

Returns:
messageText.

getPreUpdateState

public 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.

setConstraintlabelFromDB

public void setConstraintlabelFromDB(java.lang.String constraintlabel)
Description copied from interface: DatabaseconstraintToDBObject
Sets constraintlabel from the DB

Specified by:
setConstraintlabelFromDB in interface DatabaseconstraintToDBObject
Parameters:
constraintlabel - The DB value for constraintlabel

setConstraintmessagetextFromDB

public void setConstraintmessagetextFromDB(java.lang.String constraintmessagetext)
Description copied from interface: ConstraintmessagetextToDBObject
Sets constraintmessagetext from the DB

Specified by:
setConstraintmessagetextFromDB in interface ConstraintmessagetextToDBObject
Parameters:
constraintmessagetext - The DB value for constraintmessagetext

setErrorCode

public final void setErrorCode(long errorCode)
Sets errorCode

Parameters:
errorCode - The errorCode to set.

setErrorcodeFromDB

public void setErrorcodeFromDB(java.lang.String errorcode)
Description copied from interface: DatabaseconstraintToDBObject
Sets errorcode from the DB

Specified by:
setErrorcodeFromDB in interface ConstraintmessagetextToDBObject
Specified by:
setErrorcodeFromDB in interface DatabaseconstraintToDBObject
Parameters:
errorcode - The DB value for errorcode

setExpression

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

Parameters:
expression - The expression to set.

setLabel

public final void setLabel(java.lang.String label)
Sets label

Parameters:
label - The label to set.

setMessageText

public final void setMessageText(java.lang.String messageText)
Sets messageText

Parameters:
messageText - The corresponding messagetext to be generated upon violations of the constraint. null or a dash ("-") means "none".

setPreUpdateState

public 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

setSp_expressionFromDB

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

Specified by:
setSp_expressionFromDB in interface DatabaseconstraintToDBObject
Parameters:
constraintexpression - The DB value for constraintexpression

smartUpdateComand

public DmlAssignmentCommand smartUpdateComand()
                                       throws NoUpdatesException
Gets a "smart" update command that brings the catalog from the state reflected in preUpdateState, to the current state. The "smart" update command consists of :

Returns:
a "smart" update command that brings the catalog from the state reflected in preUpdateState, to the current state.
Throws:
NoUpdatesException - If there are no differences between the pre-update and the current state