Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.3.0)

E17060-01

oracle.odi.domain.model
Class OdiCondition

java.lang.Object
  extended by oracle.odi.domain.support.BusinessObject
      extended by oracle.odi.domain.support.AbstractRepositoryEntity
          extended by oracle.odi.domain.support.AbstractOdiEntity
              extended by oracle.odi.domain.model.OdiCondition
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IOdiEntity, IRepositoryEntity, IWorkDevelopmentOdiEntity

public class OdiCondition
extends oracle.odi.domain.support.AbstractOdiEntity
implements IWorkDevelopmentOdiEntity

An OdiCondition allows to define a data constraint to check on an 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).

Since:
11.1.1.3.0
See Also:
Serialized Form

Nested Class Summary
static class OdiCondition.ConditionType
          Defines the type of an OdiCondition.
 
Field Summary
static int NAME_MAX_LENGTH
          Maximum length supported for the "name" property.
 
Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
STARTING_INTERNAL_VERSION
 
Constructor Summary
OdiCondition(OdiDataStore pDataStore, java.lang.String pName)
          Creates a condition belonging to pDatastore with the name pName.
 
Method Summary
 java.lang.Number getConditionId()
          Returns the internal identifier of this OdiCondition instance.
 OdiCondition.ConditionType getConditionType()
          Returns the OdiCondition.ConditionType of this OdiCondition instance.
 OdiDataStore getDataStore()
          Obtains the OdiDataStore to which this condition belongs.
 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 getName()
          Returns the name of this OdiCondition instance.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 Expression getWhereClause()
          Returns the Expression representing the where clause defined on this OdiCondition.
 boolean isActive()
          Returns whether this OdiCondition instance is active or not.
 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 isStaticCheckEnabled()
          Returns whether static check is enabled on this OdiCondition instance or not.
 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.
 void setStaticCheckEnabled(boolean pStaticCheckEnabled)
          Defines whether static check is enabled on this OdiCondition instance or not.
 void setWhereClause(Expression pClause)
          Sets the where clause for this OdiCondition.
 
Methods inherited from class oracle.odi.domain.support.AbstractOdiEntity
equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, hashCode, isInstanceLevelSecurityNeeded, isNew, toString
 
Methods inherited from class oracle.odi.domain.support.BusinessObject
clone
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.odi.domain.IOdiEntity
getFirstDate, getFirstUser, getLastDate, getLastUser, isInstanceLevelSecurityNeeded
 

Field Detail

NAME_MAX_LENGTH

public static final int NAME_MAX_LENGTH
Maximum length supported for the "name" property.

See Also:
setName(String), Constant Field Values
Constructor Detail

OdiCondition

public OdiCondition(OdiDataStore pDataStore,
                    java.lang.String pName)
Creates a condition belonging to pDatastore with the name pName.

Parameters:
pDataStore - parent datastore
pName - name of this condition
Throws:
java.lang.IllegalArgumentException - if the Datastore is null or if the name is null, empty or longer than 128
Method Detail

getConditionId

public java.lang.Number getConditionId()
Returns the internal identifier of this OdiCondition instance.

Returns:
the condition Id.

getConditionType

public OdiCondition.ConditionType getConditionType()
Returns the OdiCondition.ConditionType of this OdiCondition instance.

Returns:
the condition type.
See Also:
OdiCondition.ConditionType, setConditionType(ConditionType)

getDataStore

public OdiDataStore getDataStore()
Obtains the OdiDataStore to which this condition belongs.

Returns:
the parent OdiDataStore

getInternalId

public java.io.Serializable getInternalId()
Description copied from interface: IRepositoryEntity
Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.

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.

Specified by:
getInternalId in interface IRepositoryEntity
Returns:
the persistence identity of this instance

getMessage

public java.lang.String getMessage()
Returns the message used when the condition is not respected.

Returns:
the message of this condition.
See Also:
setMessage(String)

getName

public java.lang.String getName()
Returns the name of this OdiCondition instance.

Specified by:
getName in interface IOdiEntity
Overrides:
getName in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
the name

getSecurityContainer

public IRepositoryEntity getSecurityContainer()
Description copied from interface: IRepositoryEntity
Define a generic way to retrieve container for entities.

Specified by:
getSecurityContainer in interface IRepositoryEntity
Returns:
container entity

getWhereClause

public Expression getWhereClause()
Returns the Expression representing the where clause defined on this OdiCondition.

Returns:
the where clause expression.
See Also:
setWhereClause(Expression)

isActive

public boolean isActive()
Returns whether this OdiCondition instance is active or not.

Returns:
true if this condition is active, false otherwise
See Also:
setActive(boolean)

isFlowCheckEnabled

public boolean isFlowCheckEnabled()
Returns whether flow check is enabled on this OdiCondition instance or not.

Returns:
true if enabled, false otherwise.
See Also:
setFlowCheckEnabled(boolean)

isInDatabase

public boolean isInDatabase()
Returns whether this OdiCondition exists in database or not.

Returns:
true if it exists in database, false otherwise
See Also:
setInDatabase(boolean)

isStaticCheckEnabled

public boolean isStaticCheckEnabled()
Returns whether static check is enabled on this OdiCondition instance or not.

Returns:
true if enable, false otherwise
See Also:
setStaticCheckEnabled(boolean)

setActive

public void setActive(boolean pActive)
Define whether this OdiCondition is active or not.

By default, an OdiCondition is active (i.e. true).

Parameters:
pActive - true to make this condition active, false otherwise.
See Also:
isActive()

setConditionType

public void setConditionType(OdiCondition.ConditionType pConditionType)
Sets the OdiCondition.ConditionType of this OdiCondition instance.

By default an OdiConditin's type is OdiCondition.ConditionType.ODI_CONDITION.

Parameters:
pConditionType - the type of condition
See Also:
getConditionType()

setFlowCheckEnabled

public void setFlowCheckEnabled(boolean pFlowCheckEnabled)
Defines whether flow check is enabled on this OdiCondition instance or not.

By default flow check is enabled.

Parameters:
pFlowCheckEnabled - true to enable flow check, false otherwise
See Also:
isFlowCheckEnabled()

setInDatabase

public void setInDatabase(boolean pInDatabase)
Defines whether this OdiCondition exists in database or not.

By default an OdiCondition is marked as not defined in database (i.e. this property is false).

Parameters:
pInDatabase - true to mark this condition as defined in db, false otherwise
See Also:
isInDatabase()

setMessage

public void setMessage(java.lang.String pMessage)
Defines the message used when the condition is not respected.

This message will be used as error message.

Parameters:
pMessage - the error message
See Also:
getMessage()

setStaticCheckEnabled

public void setStaticCheckEnabled(boolean pStaticCheckEnabled)
Defines whether static check is enabled on this OdiCondition instance or not.

By default, static check is enabled.

Parameters:
pStaticCheckEnabled - true to enable static check, false otherwise
See Also:
isStaticCheckEnabled()

setWhereClause

public void setWhereClause(Expression pClause)
Sets the where clause for this OdiCondition.

Parameters:
pClause - the where clause
See Also:
getWhereClause()

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.3.0)

E17060-01

Copyright © 2010, Oracle and/or its affiliates. All rights reserved.