be.SIRAPRISE.client.jsba
Class TupleConstraint

java.lang.Object
  extended by be.SIRAPRISE.client.jsba.AbstractDBObject
      extended by be.SIRAPRISE.client.jsba.AbstractUpdatableDBObject
          extended by be.SIRAPRISE.client.jsba.TupleConstraint
All Implemented Interfaces:
ConstraintmessagetextToDBObject, DBObject, DBObjectToConstraintmessagetext, DBObjectToTupleconstraint, TupleconstraintToDBObject, UpdatableDBObject

public final class TupleConstraint
extends AbstractUpdatableDBObject
implements DBObjectToTupleconstraint, TupleconstraintToDBObject, DBObjectToConstraintmessagetext, ConstraintmessagetextToDBObject

Author:
Erwin

Constructor Summary
TupleConstraint()
          Creates the TupleConstraint
TupleConstraint(java.lang.String relvarName, long errorCode, java.lang.String constraintExpression, java.lang.String messageText)
          Creates the TupleConstraint
 
Method Summary
 java.lang.String getConstraintExpression()
          Gets constraintExpression
 java.lang.String getConstraintmessagetextConstraintmessagetext()
          Gets the constraintmessagetext for constraintmessagetext
 java.lang.String getConstraintmessagetextErrorcode()
          Gets the errorcode for constraintmessagetext
 long getErrorCode()
          Gets errorCode
 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.
 java.lang.String getRelvarName()
          Gets relvarName
 java.lang.String getTupleconstraintErrorcode()
          Gets the errorcode for tupleconstraint
 java.lang.String getTupleconstraintRelvarname()
          Gets the relvarname for tupleconstraint
 java.lang.String getTupleconstraintSp_expression()
          Gets the constraintexpression for tupleconstraint
 void setConstraintExpression(java.lang.String constraintExpression)
          Sets constraintExpression
 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 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 setRelvarName(java.lang.String relvarName)
          Sets relvarName
 void setRelvarnameFromDB(java.lang.String relvarname)
          Sets relvarname from the DB
 void setSp_expressionFromDB(java.lang.String constraintexpression)
          Sets constraintexpression from the DB
 DmlAssignmentCommand[] smartUpdateCommand()
          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

TupleConstraint

public TupleConstraint()
Creates the TupleConstraint


TupleConstraint

public TupleConstraint(java.lang.String relvarName,
                       long errorCode,
                       java.lang.String constraintExpression,
                       java.lang.String messageText)
Creates the TupleConstraint

Parameters:
relvarName -
errorCode -
constraintExpression -
messageText -
Method Detail

getConstraintExpression

public final java.lang.String getConstraintExpression()
Gets constraintExpression

Returns:
constraintExpression.

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

getErrorCode

public final long getErrorCode()
Gets errorCode

Returns:
errorCode.

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.

getRelvarName

public final java.lang.String getRelvarName()
Gets relvarName

Returns:
relvarName.

getTupleconstraintSp_expression

public java.lang.String getTupleconstraintSp_expression()
Description copied from interface: DBObjectToTupleconstraint
Gets the constraintexpression for tupleconstraint

Specified by:
getTupleconstraintSp_expression in interface DBObjectToTupleconstraint
Returns:
The constraintexpression for tupleconstraint

getTupleconstraintErrorcode

public java.lang.String getTupleconstraintErrorcode()
Description copied from interface: DBObjectToTupleconstraint
Gets the errorcode for tupleconstraint

Specified by:
getTupleconstraintErrorcode in interface DBObjectToTupleconstraint
Returns:
The errorcode for tupleconstraint

getTupleconstraintRelvarname

public java.lang.String getTupleconstraintRelvarname()
Description copied from interface: DBObjectToTupleconstraint
Gets the relvarname for tupleconstraint

Specified by:
getTupleconstraintRelvarname in interface DBObjectToTupleconstraint
Returns:
The relvarname for tupleconstraint

setConstraintExpression

public final void setConstraintExpression(java.lang.String constraintExpression)
Sets constraintExpression

Parameters:
constraintExpression - The constraintExpression to set.

setSp_expressionFromDB

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

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

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: TupleconstraintToDBObject
Sets errorcode from the DB

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

setMessageText

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

Parameters:
messageText - The messageText to set.

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

setRelvarName

public final void setRelvarName(java.lang.String relvarName)
Sets relvarName

Parameters:
relvarName - The relvarName to set.

setRelvarnameFromDB

public void setRelvarnameFromDB(java.lang.String relvarname)
Description copied from interface: TupleconstraintToDBObject
Sets relvarname from the DB

Specified by:
setRelvarnameFromDB in interface TupleconstraintToDBObject
Parameters:
relvarname - The DB value for relvarname

smartUpdateCommand

public DmlAssignmentCommand[] smartUpdateCommand()
                                          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