public class OdiCondition extends AbstractOdiCondition implements IWorkDevelopmentOdiEntity, IFlexFieldUser, ICondition
OdiDataStore.
ODI manages two types of OdiCondition. Supported type of condition is defined by the enum
OdiCondition.ConditionType. An OdiCondition's type can be changed using setConditionType(ConditionType).
| Modifier and Type | Class and Description |
|---|---|
static class |
OdiCondition.ConditionType
Defines the type of an OdiCondition.
|
NAME_MAX_LENGTH| Constructor and Description |
|---|
OdiCondition(OdiDataStore pDataStore,
java.lang.String pName)
Creates a condition belonging to pDatastore with the name pName.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Number |
getConditionId()
Returns the internal identifier of this
OdiCondition instance. |
OdiCondition.ConditionType |
getConditionType()
Returns the
OdiCondition.ConditionType of this OdiCondition instance. |
java.lang.String |
getDomainInterfaceType() |
java.util.Collection |
getFlexFieldsValues()
* Obtains flex fields values related to this
IFlexFieldUser. |
java.io.Serializable |
getInternalId()
Provides a common getter for the persistence layer to obtain an identity,
irrespective of the actual type of identity used.
|
java.lang.String |
getMessage()
Returns the message used when the condition is not respected.
|
java.lang.String |
getQualifiedName() |
void |
initFlexFields(IOdiFlexFieldFinder pOdiFlexFieldFinder)
Initialize flex fields related to this
IFlexFieldUser. |
boolean |
isActive()
Returns whether this
OdiCondition instance is active or not. |
boolean |
isDBCondition()
Returns whether condition is defined in the database.
|
boolean |
isFlowCheckEnabled()
Returns whether flow check is enabled on this
OdiCondition instance or not. |
boolean |
isInDatabase()
Returns whether this
OdiCondition exists in database or not. |
boolean |
isODICondition()
Returns whether condition is custom-defined in ODI.
|
void |
setActive(boolean pActive)
Define whether this
OdiCondition is active or not. |
void |
setConditionType(OdiCondition.ConditionType pConditionType)
Sets the
OdiCondition.ConditionType of this OdiCondition instance. |
void |
setFlowCheckEnabled(boolean pFlowCheckEnabled)
Defines whether flow check is enabled on this
OdiCondition instance or not. |
void |
setInDatabase(boolean pInDatabase)
Defines whether this
OdiCondition exists in database or not. |
void |
setMessage(java.lang.String pMessage)
Defines the message used when the condition is not respected.
|
getDataStore, getName, getSqlText, getWhereClause, getWhereClauseString, isStaticCheckEnabled, setStaticCheckEnabled, setWhereClausegetFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, isInstanceLevelSecurityNeeded, isNew, preCommit, toStringequals, getBigNumericId, getGlobalId, getNumericId, getParent, hashCodegetFirstDate, getFirstUser, getLastDate, getLastUser, getName, isInstanceLevelSecurityNeededgetGlobalId, getParentgetNamegetDataStore, getName, getWhereClauseString, isStaticCheckEnabledgetBigNumericId, getGlobalId, getNumericIdpublic OdiCondition(OdiDataStore pDataStore, java.lang.String pName)
pDataStore - parent datastorepName - name of this conditionDomainRuntimeException - if the Datastore is null or if the name is null, empty or longer than public boolean isInDatabase()
OdiCondition exists in database or not.true if it exists in database, false otherwisesetInDatabase(boolean)public void setInDatabase(boolean pInDatabase)
OdiCondition exists in database or not.
By default an OdiCondition is marked as not defined in database (i.e. this property is false).
pInDatabase - true to mark this condition as defined in db, false otherwiseisInDatabase()public java.lang.String getMessage()
setMessage(String)public void setMessage(java.lang.String pMessage)
This message will be used as error message.
pMessage - the error messagegetMessage()public java.lang.Number getConditionId()
OdiCondition instance.public java.io.Serializable getInternalId()
IRepositoryEntity
Typically a subclass will delegate to a public
SomePrimitiveWrapper getId() method. The necessity for the
getInternalId() abstract method is solely because the
persistence layer needs a way of obtaining the identity irrespective of
the actual identity implementation choice.
Returning null from this method will indicate the object has
never been saved. This will likely be relied on by some DAO
implementations.
getInternalId in interface IRepositoryEntitygetInternalId in class AbstractOdiConditionpublic java.util.Collection getFlexFieldsValues()
IFlexFieldUser.
In most implementations method initFlexFields(IOdiFlexFieldFinder) should be
called before calling this method.getFlexFieldsValues in interface IFlexFieldUserpublic void initFlexFields(IOdiFlexFieldFinder pOdiFlexFieldFinder)
IFlexFieldUserIFlexFieldUser.initFlexFields in interface IFlexFieldUserpOdiFlexFieldFinder - OdiFlexField finder to be used to query flex fieldspublic boolean isDBCondition()
IConditionisDBCondition in interface IConditiontrue if defined in database, false otherwisepublic boolean isODICondition()
IConditionisODICondition in interface IConditiontrue if custom-defined, false otherwisepublic java.lang.String getDomainInterfaceType()
getDomainInterfaceType in interface IModelObjectBasepublic java.lang.String getQualifiedName()
getQualifiedName in interface IModelObjectpublic OdiCondition.ConditionType getConditionType()
OdiCondition.ConditionType of this OdiCondition instance.OdiCondition.ConditionType,
setConditionType(ConditionType)public void setConditionType(OdiCondition.ConditionType pConditionType)
OdiCondition.ConditionType of this OdiCondition instance.
By default an OdiConditin's type is OdiCondition.ConditionType.ODI_CONDITION.
pConditionType - the type of conditiongetConditionType()public boolean isActive()
OdiCondition instance is active or not.true if this condition is active, false otherwisesetActive(boolean)public void setActive(boolean pActive)
OdiCondition is active or not.
By default, an OdiCondition is active (i.e. true).
pActive - true to make this condition active, false otherwise.isActive()public boolean isFlowCheckEnabled()
OdiCondition instance or not.isFlowCheckEnabled in interface IConditiontrue if enabled, false otherwise.setFlowCheckEnabled(boolean)public void setFlowCheckEnabled(boolean pFlowCheckEnabled)
OdiCondition instance or not.
By default flow check is enabled.
pFlowCheckEnabled - true to enable flow check, false otherwiseisFlowCheckEnabled()