@Relvars(relvarNames={"DATABASECONSTRAINT","CONSTRAINTMESSAGETEXT"}) public final class DatabaseConstraint extends AbstractUpdatableDBObject
Constructor and Description |
---|
DatabaseConstraint()
Creates the DatabaseConstraint
|
DatabaseConstraint(long errorCode,
java.lang.String constraintExpressionText,
java.lang.String constraintLabel,
java.lang.String constraintMessageText)
Creates the DatabaseConstraint
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConstraintExpressionText()
Gets expression
|
java.lang.String |
getConstraintLabel()
Gets label
|
java.lang.String |
getConstraintMessageText()
Gets messageText
|
long |
getErrorCode()
Gets errorCode
|
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 |
setConstraintExpressionText(java.lang.String constraintExpressionText)
Sets expression
|
void |
setConstraintExpressionText(ValueBuffer constraintExpressionText)
Sets expression
|
void |
setConstraintLabel(java.lang.String constraintLabel)
Sets label
|
void |
setConstraintLabel(ValueBuffer constraintLabel)
Sets label
|
void |
setConstraintMessageText(java.lang.String constraintMessageText)
Sets messageText
|
void |
setConstraintMessageText(ValueBuffer constraintMessageText)
Sets messageText
|
void |
setErrorCode(long errorCode)
Sets errorCode
|
void |
setErrorCode(ValueBuffer errorCode)
Sets errorCode
|
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.
|
DmlAssignmentCommand |
smartUpdateComand()
Gets a "smart" update command that brings the catalog from the state reflected in preUpdateState, to the current state.
|
dbUpdateCommand, dbUpdateCommand, dbUpdateCommand
dbAddCommand, dbAddCommand, dbAddCommand, dbAddCommandAll, dbAssertCommand, dbAssertCommand, dbAssertCommand, dbAssertCommandAll, dbDeleteCommand, dbDeleteCommand, dbDeleteCommand, dbDeleteCommandAll, dbUnAssertCommand, dbUnAssertCommand, dbUnAssertCommand, dbUnAssertCommandAll
public DatabaseConstraint()
public DatabaseConstraint(long errorCode, java.lang.String constraintExpressionText, java.lang.String constraintLabel, java.lang.String constraintMessageText)
errorCode
- -constraintExpressionText
- -constraintLabel
- -constraintMessageText
- the corresponding messagetext to be generated upon violations of the constraint. null or a dash ("-") means "none".@GetterMethod(attributeDefs=@AttributeDef(attributeName="SP_EXPRESSION",requiresEscaping=true,typeName="STRING"), relvarNames="DATABASECONSTRAINT") public final java.lang.String getConstraintExpressionText()
@GetterMethod(attributeDefs=@AttributeDef(attributeName="CONSTRAINTLABEL",requiresEscaping=true,typeName="STRING"), relvarNames="DATABASECONSTRAINT") public final java.lang.String getConstraintLabel()
@GetterMethod(attributeDefs=@AttributeDef(attributeName="CONSTRAINTMESSAGETEXT",requiresEscaping=true,typeName="STRING"), relvarNames="CONSTRAINTMESSAGETEXT") public final java.lang.String getConstraintMessageText()
@GetterMethod(attributeDefs=@AttributeDef(attributeName="ERRORCODE",requiresEscaping=false,typeName="LONG"), relvarNames="DATABASECONSTRAINT") public final long getErrorCode()
public UpdatableDBObject getPreUpdateState()
UpdatableDBObject
public final void setConstraintExpressionText(java.lang.String constraintExpressionText)
constraintExpressionText
- The expression to set.@AttributeDef(attributeName="SP_EXPRESSION", requiresEscaping=true, typeName="STRING") public final void setConstraintExpressionText(ValueBuffer constraintExpressionText)
constraintExpressionText
- The expression to set.public final void setConstraintLabel(java.lang.String constraintLabel)
constraintLabel
- The label to set.@AttributeDef(attributeName="CONSTRAINTLABEL", requiresEscaping=true, typeName="STRING") public final void setConstraintLabel(ValueBuffer constraintLabel)
constraintLabel
- The label to set.public final void setConstraintMessageText(java.lang.String constraintMessageText)
constraintMessageText
- The corresponding messagetext to be generated upon violations of the constraint. null or a dash ("-") means "none".@AttributeDef(attributeName="CONSTRAINTMESSAGETEXT", requiresEscaping=true, typeName="STRING") public final void setConstraintMessageText(ValueBuffer constraintMessageText)
constraintMessageText
- The corresponding messagetext to be generated upon violations of the constraint. null or a dash ("-") means "none".public final void setErrorCode(long errorCode)
errorCode
- The errorCode to set.@AttributeDef(attributeName="ERRORCODE", requiresEscaping=false, typeName="LONG") public final void setErrorCode(ValueBuffer errorCode)
errorCode
- The errorCode to set.public final void setPreUpdateState()
UpdatableDBObject
public DmlAssignmentCommand smartUpdateComand() throws NoUpdatesException
NoUpdatesException
- If there are no differences between the pre-update and the current state