Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.jbo.server
Class EntityDefImpl

java.lang.Object
  extended by oracle.jbo.common.NamedObjectImpl
      extended by oracle.jbo.mom.DefinitionObject
          extended by oracle.jbo.mom.PersistableDefObject
              extended by oracle.jbo.server.DefObject
                  extended by oracle.jbo.server.MetaObject
                      extended by oracle.jbo.server.RowDef
                          extended by oracle.jbo.server.EntityDefImpl
All Implemented Interfaces:
ResourceBundleOwner, ExprValueSupplier, DefPersistable, PersistentDefinition, ValidationManager, AttributeDependencyManager, OperationDefinitionContainer, StructureDef, VariableManagerOwner, VariableManagerOwnerBase
Direct Known Subclasses:
EntityDefOverRowSet

public class EntityDefImpl
extends RowDef
implements StructureDef, ValidationManager

Defines metadata for Entity Object classes.

Since:
JDeveloper 3.0

Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.jbo.mom.PersistableDefObject
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType
 
Field Summary
static java.lang.String DBOBJ_TYPE_OBJTAB
           
static java.lang.String DBOBJ_TYPE_OBJTYP
           
static java.lang.String DBOBJ_TYPE_TABLE
           
static java.lang.String DBOBJ_TYPE_VIEW
           
static byte EFFECTIVE_DATE_TYPE_DATED
          Effective Dated entites could be of type dated or effective dated.
static byte EFFECTIVE_DATE_TYPE_EFFECTIVE_DATED
          Effective Dated entites could be of type dated or effective dated.
static byte EFFECTIVE_DATE_TYPE_NONE
          Constant for specifying non effective dated entitites.
protected  java.util.ArrayList mAssocAccessors
          The Association accessors for the Entity Object.
protected  java.util.ArrayList mAssocs
          Association objects for this Entity Object.
protected  java.util.ArrayList mAttrAccessors
          The Attribute accessors for the Entity Object.
protected  int mBatchThreshold
           
protected  AttributeDefImpl[] mFKeys
          List of attributes that comprise the foreign key.
protected  boolean mIsObjectTable
          Determines if the current table is an Object Table.
protected  AttributeDefImpl mOIDAttribute
          If entity is a OIDObject
protected  AttributeDefImpl[] mPrimaryKeys
          List of attributes that comprise the primary key.
protected  java.lang.String mSource
          Stores the name of the database source: the database entity for the Entity Object.
protected  java.lang.String mSourceType
          Stores the database source type.
 
Fields inherited from class oracle.jbo.server.RowDef
mAliasName, mBindingStyle
 
Fields inherited from class oracle.jbo.server.MetaObject
mComponentClass
 
Fields inherited from class oracle.jbo.mom.DefinitionObject
DEF_MDS_CLIENT_KEY, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY, PROPERTY_EXPRMAP
 
Fields inherited from class oracle.jbo.common.NamedObjectImpl
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX
 
Fields inherited from interface oracle.jbo.mom.xml.DefPersistable
XML_STATEMENT
 
Constructor Summary
EntityDefImpl()
          Default Constructor, sets the row class.
EntityDefImpl(int defScope, java.lang.String name)
           
EntityDefImpl(int defScope, java.lang.String name, java.lang.String baseEntityDefName)
           
EntityDefImpl(java.lang.String name)
           
 
Method Summary
 AssociationDefImpl addAssocAccessor(java.lang.String accName, java.lang.String assocName, java.lang.Class javaType)
           
 AttributeDefImpl addAttribute(java.lang.String attrName, java.lang.String columnName, java.lang.Class javaType, boolean isPrimaryKey, boolean isDiscriminator, boolean isPersistent)
           
 AttributeDefImpl addAttributeOfKind(java.lang.String attrName, java.lang.String columnName, java.lang.Class javaType, boolean isPrimaryKey, boolean isDiscriminator, byte kind)
           
protected  void addEntityAssociation(EntityAssociation assoc)
          Internal: Applications should not use this method.
 void addEventAttr(java.lang.String attrName)
           
 OperationDefinitionImpl addGroovyOperation(java.lang.String id, java.lang.String name, java.lang.String returnType, java.util.LinkedHashMap<java.lang.String,java.lang.String> params, java.lang.String body)
          Deprecated.  
 OperationDefinitionImpl addGroovyRowOperation(java.lang.String id, java.lang.String name, java.lang.String returnType, java.util.LinkedHashMap<java.lang.String,java.lang.String> params, java.lang.String body)
          Deprecated.  
 void addOperation(OperationDefinitionImpl opDef)
          Deprecated.  
protected  void addPropertyChangeListener(int index, PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list for an attribute at the given index.
protected  void addPropertyChangeListener(java.lang.String attributeName, PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list for an attribute of the given Name.
 void addRowOperation(OperationDefinitionImpl opDef)
          Deprecated.  
 void addTrigger(TriggerType type, JboValidatorInterface listener)
          Internal: Applications should not use this method. *
protected  void addUniqueKeyValidation(JboUniqueKeyValidator val)
           
 void addUniqueKeyValidator(JboUniqueKeyValidator val)
          Add a unique key validator.
protected  void addUniquePKValidation()
          Adds validators to each primary key attribute of this Entity to ensure that the primary key for an Entity is always unique.
 void addValidator(JboValidatorInterface listener)
          Adds a JboValidatorInterface to the listener list.
protected  void addVetoableChangeListener(int index, VetoableChangeListener listener)
          This method will be deprecated in a future release.
protected  void addVetoableChangeListener(java.lang.String attributeName, VetoableChangeListener listener)
          This method will be deprecated in a future release.
protected  void addVetoableChangeListener(VetoableChangeListener listener)
          This method will be deprecated in a future release.
static boolean checkEntityLocked(Row en)
          Internal: Applications should not use this method. Called by BaseLobDomain to check for entity's locked state in local mode using reflection rather than direct call as Domains need to be "server" independent.
protected  KeyDef createAltKey(java.lang.String keyName, int keyIndex, java.lang.String[] components)
           
protected  EntityImpl createBlankInstance(DBTransaction txn)
           
 EntityImpl createBlankInstance2(DBTransaction txn)
          Internal: Applications should not use this method.
protected  void createDef()
          This method should be used to perform custom-metadata initialization in a subclass of EntityDefImpl.
static EntityDefImpl createEntityDef(int defScope, java.lang.String defClassName, java.lang.String dbObjName, java.lang.String viewObjectBase)
           
protected  EntityImpl createInstance(DBTransaction txn, AttributeList al)
           
 EntityImpl createInstance2(DBTransaction txn, AttributeList al)
          Instantiate an instance of the Entity.
 Key createKey(AttributeList al)
          Given a set of attribute values (name-value pairs), creates a Primary key object for this Entity.
 AttributeDef findAttributeDef(java.lang.String name)
          Gets an attribute definition, given its name.
 EntityImpl findByAltKey(DBTransaction txn, java.lang.String keyName, Key key, boolean inclSubclasses, boolean searchDatabase)
           
 EntityImpl findByPKExtended(DBTransaction txn, Key key, boolean inclSubclasses)
           
 EntityImpl findByPrimaryKey(DBTransaction txn, Key key)
          Finds an Entity Object given a Primary Key.
static EntityDefImpl findDefObject(java.lang.String defFullName)
          Finds the named Entity Object definition.
static EntityDefImpl findDefObjectNoSub(java.lang.String defFullName)
          Finds the named Entity Object definition.
 EntityImpl findInCacheByAltKeyExtended(DBTransaction txn, java.lang.String keyName, Key key, boolean inclSubclasses)
           
 EntityImpl findInCacheByPKExtended(DBTransaction txn, Key key, boolean inclSubclasses)
           
 EntityImpl findInCacheByPrimaryKey(DBTransaction txn, Key key)
          Returns an Entity Object in EntityCache given a Primary Key.
 OperationDefinitionImpl findOperationDefinition(java.lang.String id)
          Deprecated.  
 OperationDefinitionImpl findRowOperationDefinition(java.lang.String id)
          Deprecated.  
protected  void finishedLoading()
           
static java.lang.String[] getAllDefNames()
           
 java.util.Iterator getAllEntityInstances(DBTransaction tr)
          Deprecated. since 5.0 use getAllEntityInstancesIterator.
 java.util.Iterator getAllEntityInstancesIterator(DBTransaction tr)
          Creates an iterator for stepping through instances of Entities of this definition object type.
 AssociationDefImpl getAssociationDefImpl(int index)
          Returns the AssociationDefImpl (association accessors) given an index.
 AssociationDefImpl getAssociationDefImpl(java.lang.String name)
          Returns the AssociationDefImpl (association accessors) given the association name.
 AssociationDefImpl[] getAssociationDefImpls()
          Returns the AssociationDefImpls.
 int getAttributeCount()
          Returns the number of defined attributes.
 AttributeDef getAttributeDef(int index)
          Gets an attribute definition, given its index.
 AttributeDefImpl getAttributeDefImpl(int index)
          Given the attribute's column position (index) in the database, returns the attribute definition object.
 AttributeDefImpl getAttributeDefImpl(java.lang.String attrName)
          Given an attribute name, returns the attribute definition object.
protected  AttributeDefImpl getAttributeDefImplByColumnName(java.lang.String colName)
          Given an attribute's column name, returns the attribute definition object.
protected  AttributeDefImpl[] getAttributeDefImpls()
          Returns the AttributeDefImpls objects for this Entity Object.
 AttributeDef[] getAttributeDefs()
          Gets the defined attributes.
 java.lang.Class getBaseComponentClass()
          Internal: Applications should not use this method.
 int getBatchThreshold()
           
protected  AttributeDefImpl getChangeIndicatorColumn()
          Returns the AttributeDef for the Change Indicator column for the datasource.
 AttributeDefImpl getChangeIndicatorColumn2()
           
 java.lang.String getClientProxyClassName()
           
 java.lang.Class getCollClass()
          Gets the implementation class of this Entity's collection.
 java.lang.String getColumnNameForQuery(int index)
           
 java.lang.Class getComponentClass()
           
 java.lang.String getComponentInterfaceName()
           
 java.util.Iterator<EventMapping> getCreateEvents()
          Returns the list of events to fire when a row is created in the entity.
static java.lang.String getCurrentSequencedRowChar()
           
 AttributeDefImpl getDataSecurityAttribute()
          Internal: Applications should not use this method.
 int getDefTypeId()
           
 java.lang.String getDefXMLElementTag()
           
 java.util.Iterator<EventMapping> getDeleteEvents()
          Returns the list of events to fire when a row is deleted in the entity.
protected  java.lang.String getEffDtNextRowsVOName()
          The name of the View Object that is generated to query the rows that follow an effective dated row and has the same primary key values.
protected  java.lang.String getEffDtPreviousRowsVOName()
          The name of the View Object that is generated to query the rows that precedes an effective dated row and has the same primary key values.
protected  java.lang.String getEffectiveClientProxyClassName()
           
protected  java.lang.String getEffectiveComponentInterfaceName()
           
 AttributeDefImpl getEffectiveDateSequenceAttr()
           
 AttributeDefImpl getEffectiveDateSequenceFlagAttr()
           
 AttributeDefImpl getEffectiveDateTransientAttr()
          Retuns the Attribute definition that stores the Effective Date value in a row.
protected  java.lang.String getEffectiveDateTransientAttrName()
          The name of the transient attribute that is used to lookup the effective date of a row while doing DML operations.
 byte getEffectiveDateType()
          Returns the Effective Date type of the Entity definition.
 AttributeDefImpl getEffectiveEndDateAttr()
           
 AttributeDefImpl getEffectiveStartDateAttr()
           
 java.lang.String getEJBAppProviderURL()
           
 java.lang.Object getEJBHome()
           
 java.lang.String getEJBHomeJNDIName()
           
protected  EntityAssociation[] getEntityAssociations()
          Internal: Applications should not use this method.
 EventDef getEventDef(java.lang.String name)
          Gets the request event definition.
 java.lang.String getEventNamespace()
           
 java.util.Iterator getEventParentAttrs()
          Gets the list of attributes on the parent entity that are used in the payload of events on this entity.
 java.lang.String getEventPayloadNamespace()
           
 java.util.Iterator getEventTransAttrs()
           
 java.util.ArrayList getExtendedDefObjects(boolean bSkipBusLogicUnits)
           
protected  AttributeDefImpl[] getForeignKeyAttrs()
          Returns the list of AttributeDefs that make the foreign key for the composition cases.
 java.lang.String getHintValue(LocaleContext locale, java.lang.String sHintName)
           
static java.lang.Integer getLowestEffDtSequenceValue()
           
static int getMaxAttrConst(java.lang.String entityName)
          Returns the index of the last attribute for this entity at runtime.
protected  java.lang.String getNextEffSequenceRowsVOName()
          The name of the View Object used to query effective dated rows with higher sequence values within the same effective start date (used in Multiple Changes Per Day).
protected  AttributeDefImpl getOIDAttribute()
          Internal: Applications should not use this method.
 OperationDefinitionsImpl getOperationDefinitions()
          Deprecated.  
 java.lang.String getOwnerRowType()
           
 oracle.adf.share.security.binding.BindingPermissionDef getPermissionDef()
          Internal: Applications should not use this method.
protected  java.lang.String getPrevEffSequenceRowsVOName()
          The name of the View Object used to query effective dated rows with lower sequence values within the same effective start date (used in Multiple Changes Per Day).
protected  AttributeDefImpl[] getPrimaryKeys()
          Returns the AttributeDef's that define the primary key.
static java.lang.String getPriorSequencedRowChar()
           
 java.lang.Object getProperty(java.lang.String hintName)
          Retrieves the specified property, if it exists.
 java.lang.String getQuery()
          Returns the query that will return all columns for this Entity.
 AttributeDef[] getRawAttributeDefs(boolean procAccessors)
           
 int getRefAttrIndex()
           
protected  AttributeDefImpl[] getRetrievedOnInsertAttributes()
          Returns the list of attributes for which the Refresh on Insert flag is enabled at Design Time.
protected  AttributeDefImpl[] getRetrievedOnInsertPrimaryKeys()
          Returns the list of primary keys for which the Refresh on Insert flag is enabled at Design Time.
protected  AttributeDefImpl[] getRetrievedOnUpdateAttributes()
          Returns the list of attributes for which the Refresh on Update flag is enabled at Design Time.
protected  AttributeDefImpl[] getRetrievedOnUpdatePrimaryKeys()
          Returns the list of primary key attributes for which the Refresh on Update flag is enabled at Design Time.
 java.lang.Class getRowClass()
          Gets the implementation class of this Entity's rows.
 OperationDefinitionsImpl getRowOperationDefinitions()
          Deprecated.  
 java.lang.String getSelectClause(SQLBuilder sqlBuilder)
           
 java.lang.String getSelectClause(SQLBuilder sqlBuilder, boolean forViewObject)
           
 java.lang.String getSource()
          Returns the name of the Database source table.
 java.lang.String getSourceType()
          Internal: Applications should not use this method.
 java.util.ArrayList getTriggersOfType(TriggerType type)
          Internal: Applications should not use this method. *
 AttributeDefImpl[] getUniqueKeys()
          Returns the list of attributes that were marked as Unique-key constituents in designtime The order of attribute definitions is the order in which the unique-key attributes appear in the set of attributes for this entity.
 java.util.Iterator<EventMapping> getUpdateEvents()
          Returns the list of events to fire when a row is updated in the entity.
 java.util.ArrayList getValidators()
          Get the list of JboValidatorInterface objects registered with this entity
 boolean hasDataSecurity()
           
 boolean hasEffectiveDateSequence()
           
protected  boolean hasLOBAttrs()
          Determines whether the EntityDef contains attributes that are LOBs.
 boolean isAssociationAccessorRetained()
           
 boolean isEffectiveDated()
          Checks if this Entity definition is Effective Dated.
 boolean isObjectTable()
          Determines whether this is an Object table.
protected  boolean isOIDInPrimaryKey()
          Determines whether the OID (object identifier) attribute is a primary key.
 boolean isRefPKBased()
          Indicates whether this Entity's REF is primary key based or not.
protected  boolean isRowIDPrimaryKey()
          Determines whether this Entity Object has a ROWID attribute that is used as a primary key.
 boolean isSingleUseKeyStatement()
           
 boolean isUpdatable()
          Internal: Applications should not use this method.
 boolean isUpdateChangedColumns()
          Determines whether the SQL generation of UPDATE statements should include all of the columns or just the changed columns.
 boolean isUseGlueCode()
           
 boolean isUseReturningClause()
          Indicates if DML should use the RETURNING clause for this entity type.
protected  void loadAttribute(DefElement elem)
          Load the attributes from the XMLInput Stream
protected  void loadCustomDef(DefElement xmlElement)
          Internal: Applications should not use this method.
protected static EntityDefImpl loadFromXML(DefElement xmlElement, EntityDefImpl eInfo, EntityDefImpl baseEntityDef, boolean loadingBaseDef)
          Create the EntityDefImpl from XML metadata stream
protected static void loadFromXML(DefElement xmlElement, oracle.jbo.server.RemotableCompDef defObj)
           
protected  void loadOperationDefinitions(DefElement xmlElement)
          Deprecated.  
protected  void loadViewAccessors(DefElement xmlElement)
           
 void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
           
 AttributeDef lookupAttributeDef(java.lang.String name)
          Gets an attribute definition, given its name.
 OperationDefinitionImpl lookupOperationDefinition(java.lang.String id)
          Deprecated.  
 OperationDefinitionImpl lookupRowOperationDefinition(java.lang.String id)
          Deprecated.  
 JboValidatorInterface lookupValidator(java.lang.String name)
           
protected  EntityImpl newInstance(DBTransaction txn)
           
 EntityImpl newInstance2(DBTransaction txn)
          Internal: Applications should not use this method.
 void removeOperation(OperationDefinitionImpl opDef)
          Deprecated.  
protected  void removePropertyChangeListener(int index, PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list of the given attribute (by index).
protected  void removePropertyChangeListener(java.lang.String attributeName, PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list of the given attribute (by index).
 void removeRowOperation(OperationDefinitionImpl opDef)
          Deprecated.  
 void removeTrigger(TriggerType trig, java.lang.String valName)
          Internal: Applications should not use this method. *
protected  void removeValidator(JboValidatorInterface listener)
          Removes a VetoableChangeListener from the listener list.
protected  void removeVetoableChangeListener(int index, VetoableChangeListener listener)
          This method will be deprecated in a future release.
protected  void removeVetoableChangeListener(java.lang.String attributeName, VetoableChangeListener listener)
          This method will be deprecated in a future release.
protected  void removeVetoableChangeListener(VetoableChangeListener listener)
          This method will be deprecated in a future release.
 void resolveDefObject()
          This method performs final resolution of various parts of the entity definition before this definition object can be used.
protected  void resolveReferences()
          Since this gets called from lazyload, load all attribute accessors upfront.
 void setAssociationAccessorRetained(boolean b)
           
 void setBatchThreshold(int threshold)
           
 void setChangeIndicatorColumn(AttributeDefImpl chgIndCol)
           
 void setClientProxyClassName(java.lang.String name)
           
 void setCollClass(java.lang.Class collClass)
          Internal: Applications should not use this method.
 void setComponentClass(java.lang.Class refClass)
           
 void setComponentInterfaceName(java.lang.String interfaceName)
           
protected  void setDefForComponent(ComponentObjectImpl comp)
           
 void setEffectiveDateType(byte effDtType)
          Sets the Effective Date Type for this Entity definition.
 void setEJBAppProviderURL(java.lang.String url)
           
 void setEJBHomeJNDIName(java.lang.String nam)
           
 void setEventNamespace(java.lang.String namespace)
           
 void setEventPayloadNamespace(java.lang.String namespace)
           
 void setOwnerRowType(java.lang.String ot)
           
 void setPermissionDef(oracle.adf.share.security.binding.BindingPermissionDef permDef)
           
 void setRefPKBased(boolean val)
          Internal: Applications should not use this method.
 void setRowClass(java.lang.Class rowClass)
          Internal: Applications should not use this method.
 void setSingleUseKeyStatement(boolean singleUse)
           
 void setSource(java.lang.String source)
          Internal: Applications should not use this method.
 void setSourceType(java.lang.String sourceType)
          Internal: Applications should not use this method.
 void setUpdatable(boolean flag)
          Internal: Applications should not use this method.
 void setUpdateChangedColumns(boolean updateChangedColumns)
          Sets the flag for status to update on Changed Columns
 void setUseGlueCode(boolean b)
           
protected  void setUseReturningClause(boolean flag)
          Subclasses should call this method with false, on the EntityDef to indicate that this entity type should not use RETURNING clause to fetch refresh-on-insert or refresh-on-update values.
protected  void unsetDefForComponent(ComponentObjectImpl comp)
           
 void writeChildren(DefWriter jos)
          Writes the Object's children to the Persistent storage
 void writeContents(DefWriter jos)
          Objects should write their persistence output in this method
 
Methods inherited from class oracle.jbo.server.RowDef
addAltKey, addExtendedDefObject, addForwardDependency, addListBindingDef, addListBindingDef, addViewAccessorDef, appendBindingNameForAttr, appendBindingSpec, appendBindingSpec, discrValuesQualify, findAltKeyDef, findAttrDefIncludingPDef, findDefForDiscrValues, findListBindingDef, findViewAccessorDef, getAliasName, getAllProperties, getAltKeyAttrDefs, getAltKeyAttrDefs, getAltKeyCount, getAltKeyDef, getAltKeyIndex, getAltKeyNames, getAttributeIndexOf, getBackwardDependencies, getBackwardDependencyAttributes, getBindingStyle, getDataSourceDef, getDefFullName, getDefName, getDiscrColumns, getExprVarVal, getForwardDependencies, getForwardDependencyAttributes, getListBindingDefs, getViewAccessorDefs, loadListBindings, loadViewAccessor, lookupAltKeyDef, lookupListBindingDef, lookupViewAccessorDef, registerDefObject, removeAltKey, removeListBindingDef, removeViewAccessorDef, resolvePropertyRaw, setAliasName, setBindingStyle, setDiscrColumns, setExprVarVal, setThrowOnListBindingMismatch, throwOnListBindingMismatch, verifyExtendedDefObjects, writeXMLContents
 
Methods inherited from class oracle.jbo.server.MetaObject
deregisterSessionObject, getMessageBundleClass, getMsgBundleDef, getPackageDef, getPackageName, getPersDef, getResourceBundleDef, getResourcePrefix, isDynamic, loadResourceBundle, registerSessionDefObject, setMessageBundleClass, setResourceBundleDef
 
Methods inherited from class oracle.jbo.server.DefObject
ensureVariableManager, getBaseDefObject, getDefXMLNameSpace, getVariableManager, getVarMgrParents, hasVariables, loadProperties, loadVariables, setBaseDefObject, setBaseDefObject, setName, setParent
 
Methods inherited from class oracle.jbo.mom.PersistableDefObject
addDefImport, allocatePropertyMap, checkEditable, close, createFromXML, findDefImport, getBaseDir, getBasePackage, getDefImports, getDefManager, getDefWriter, getEditObject, getFileName, getFullDirName, getFullFileName, getOrigObject, getPropertyMap, getSubstitutedNames, getXMLElementTag, guaranteePath, isCustomizationEnabled, isCustomizationEnabled, isDirty, isEditable, isNew, isPersonalizationEnabled, isPersonalizationEnabled, loadDefImports, mergePropertyMap, objectRemoved, registerClass, remove, removeAndDelete, removeDefImport, removeProperty, saveXMLContents, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setDirty, setEditable, setNew, setOrigObject, setPersonalizationEnabled, setPersonalizationEnabled, setProperty, setPropertyExpression, setPropertyMap, updateChildrenList, verifyVersion, writeObject, writeVersion
 
Methods inherited from class oracle.jbo.mom.DefinitionObject
addPropertySetName, getContainerDef, getContainerName, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getPropertySetName, getPropertySetNames, hasExtendedDefObjects, isBaseDefFor, isDynamicDefinitionObject, isObjectResolved, loadCustomProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, removeExtendedDefObject, setDefScope, setMdsKey, setMdsReference, setObjectResolved, setPropertySetName
 
Methods inherited from class oracle.jbo.common.NamedObjectImpl
getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getPropertyExpressionsMap, getResourcesFromBundle, getStringFromMessageBundle, isPropertyExpression, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, setFullName, setPropertiesMap, setPropertiesMap2, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.jbo.StructureDef
getAttributeIndexOf, getDefFullName, getDefName, getFullName, getName
 
Methods inherited from interface oracle.jbo.rules.ValidationManager
getFullName, getName, getResourceBundleDef
 
Methods inherited from interface oracle.jbo.VariableManagerOwner
getName
 
Methods inherited from interface oracle.jbo.mom.xml.DefPersistable
getFullName
 

Field Detail

DBOBJ_TYPE_TABLE

public static final java.lang.String DBOBJ_TYPE_TABLE
See Also:
Constant Field Values

DBOBJ_TYPE_VIEW

public static final java.lang.String DBOBJ_TYPE_VIEW
See Also:
Constant Field Values

DBOBJ_TYPE_OBJTYP

public static final java.lang.String DBOBJ_TYPE_OBJTYP
See Also:
Constant Field Values

DBOBJ_TYPE_OBJTAB

public static final java.lang.String DBOBJ_TYPE_OBJTAB
See Also:
Constant Field Values

EFFECTIVE_DATE_TYPE_DATED

public static final byte EFFECTIVE_DATE_TYPE_DATED
Effective Dated entites could be of type dated or effective dated. The dated entities have a start and end effective date attributes but do not perform row split operations on attribute change. The validation is limited to simple overlap checks. Effective dated entities have elaborate row split operations and validations when an attribute value changes. In effect, the history of all the modifications is maintained.

See Also:
Constant Field Values

EFFECTIVE_DATE_TYPE_EFFECTIVE_DATED

public static final byte EFFECTIVE_DATE_TYPE_EFFECTIVE_DATED
Effective Dated entites could be of type dated or effective dated. Effective dated entities keep an audit trail of all the changes made to the values of a row. During DML, an attribute change will trigger a row update, end dating a previous row and creating a new row with the effective date as the start date.

See Also:
Constant Field Values

EFFECTIVE_DATE_TYPE_NONE

public static final byte EFFECTIVE_DATE_TYPE_NONE
Constant for specifying non effective dated entitites.

See Also:
Constant Field Values

mAttrAccessors

protected java.util.ArrayList mAttrAccessors
The Attribute accessors for the Entity Object.


mAssocAccessors

protected java.util.ArrayList mAssocAccessors
The Association accessors for the Entity Object.


mAssocs

protected java.util.ArrayList mAssocs
Association objects for this Entity Object.


mFKeys

protected AttributeDefImpl[] mFKeys
List of attributes that comprise the foreign key.


mPrimaryKeys

protected AttributeDefImpl[] mPrimaryKeys
List of attributes that comprise the primary key.


mOIDAttribute

protected AttributeDefImpl mOIDAttribute
If entity is a OIDObject


mSource

protected java.lang.String mSource
Stores the name of the database source: the database entity for the Entity Object.


mSourceType

protected java.lang.String mSourceType
Stores the database source type.


mIsObjectTable

protected boolean mIsObjectTable
Determines if the current table is an Object Table. Default is false.


mBatchThreshold

protected int mBatchThreshold
Constructor Detail

EntityDefImpl

public EntityDefImpl()
Default Constructor, sets the row class.


EntityDefImpl

public EntityDefImpl(int defScope,
                     java.lang.String name)

EntityDefImpl

public EntityDefImpl(java.lang.String name)

EntityDefImpl

public EntityDefImpl(int defScope,
                     java.lang.String name,
                     java.lang.String baseEntityDefName)
Method Detail

setOwnerRowType

public void setOwnerRowType(java.lang.String ot)
For internal use only. Application developers should not use this

getOwnerRowType

public java.lang.String getOwnerRowType()
For internal use only. Application developers should not use this

getAllDefNames

public static java.lang.String[] getAllDefNames()

findDefObjectNoSub

public static EntityDefImpl findDefObjectNoSub(java.lang.String defFullName)
Finds the named Entity Object definition. Performs essentially the same operation as findDefObject, except that it does not observe meta-object substitution.

Parameters:
defFullName - the fully qualified name of the definition.
Returns:
the Entity definition object corresponding to the specified name.
See Also:
MetaObjectManager

findDefObject

public static EntityDefImpl findDefObject(java.lang.String defFullName)
Finds the named Entity Object definition.

This method takes the fully qualified name (package_name.Entity_name) of an Entity definition and returns the corresponding Entity definition object. This method can be used to return only the Entity Object defintion object, instead of the more global methods in the MetaObjectManager class.

The following example returns the EntityDef object associated with the Categories Entity in package1.

 mDefinitionObject =
     (EntityDefImpl)EntityDefImpl.findDefObject("package1.Categories");
 

Parameters:
defFullName - the fully qualified name of the definition.
Returns:
the Entity definition object corresponding to the specified name.
See Also:
MetaObjectManager

createDef

protected void createDef()
This method should be used to perform custom-metadata initialization in a subclass of EntityDefImpl. The method is called as a notification that this definition object's metadata is loaded.

Override this method to satisfy your application's specific custom properties for the Entity definition. For example, you would override this method if your application builds custom properties programatically based on user preferences.

Subclasses of EntityDefImpl should invoke addUniquePKValidation() in this method to add primary key validators. For example:

 protected void createDef()
   {
     addUniquePKValidation();
    }

 
By default, the framework does not invoke the unique key check.

Overrides:
createDef in class RowDef
See Also:
addUniquePKValidation()

getEntityAssociations

protected EntityAssociation[] getEntityAssociations()
Internal: Applications should not use this method.

Returns an array of Entity Association objects for this Entity.

Returns:
an array of Entity Association defined for this business object.

addEntityAssociation

protected void addEntityAssociation(EntityAssociation assoc)
Internal: Applications should not use this method.

Adds an Entity Association to this Entity.

Parameters:
assoc - the entity assocition to be added.

getAttributeDefImpl

public AttributeDefImpl getAttributeDefImpl(java.lang.String attrName)
Given an attribute name, returns the attribute definition object.

This method takes the string name of an Entity Object attribute and returns the corresponding attribute definition object. For example, use this method to get the attribute definition object to store custom properties.

Parameters:
attrName - the specified Entity attribute.
Returns:
an Entity attribute definition object.

getAttributeDefImpl

public AttributeDefImpl getAttributeDefImpl(int index)
Given the attribute's column position (index) in the database, returns the attribute definition object.

This method takes the Entity attribute's database column position (index) and returns the corresponding attribute definition object. For example, use this method to get the attribute definition object to store custom properties.

Parameters:
index - the attribute's database column position, where the leftmost column has index 0.
Returns:
an Entity attribute definition object; null if the given index is invalid.

getAttributeDefImplByColumnName

protected AttributeDefImpl getAttributeDefImplByColumnName(java.lang.String colName)
Given an attribute's column name, returns the attribute definition object.

This method takes the Entity attribute's database colunm name and returns the corresponding attribute definition object. For example, use this method to get the attribute definition object to store custom properties.

Parameters:
colName - the name of the attribute's column in the database.
Returns:
an Entity attribute definition object.

getAttributeDefImpls

protected AttributeDefImpl[] getAttributeDefImpls()
Returns the AttributeDefImpls objects for this Entity Object. This method is typically used when customizing properties.

Specified by:
getAttributeDefImpls in class RowDef
Returns:
an array of the attribute descriptors.

getAttributeDefs

public AttributeDef[] getAttributeDefs()
Description copied from class: RowDef
Gets the defined attributes.

Specified by:
getAttributeDefs in interface StructureDef
Specified by:
getAttributeDefs in class RowDef
Returns:
an array of attribute definitions.

getRawAttributeDefs

public AttributeDef[] getRawAttributeDefs(boolean procAccessors)
Specified by:
getRawAttributeDefs in class RowDef

getAttributeCount

public int getAttributeCount()
Description copied from class: RowDef
Returns the number of defined attributes.

Specified by:
getAttributeCount in interface StructureDef
Specified by:
getAttributeCount in class RowDef
Returns:
the number of attributes.

findAttributeDef

public AttributeDef findAttributeDef(java.lang.String name)
Description copied from class: RowDef
Gets an attribute definition, given its name.

Specified by:
findAttributeDef in interface StructureDef
Specified by:
findAttributeDef in class RowDef
Parameters:
name - the name of an AttributeDef.
Returns:
an attribute definition

lookupAttributeDef

public AttributeDef lookupAttributeDef(java.lang.String name)
Description copied from class: RowDef
Gets an attribute definition, given its name.

Specified by:
lookupAttributeDef in interface AttributeDependencyManager
Specified by:
lookupAttributeDef in interface StructureDef
Specified by:
lookupAttributeDef in class RowDef
Parameters:
name - the name of an AttributeDef.
Returns:
an attribute definition if found, null otherwise

getAttributeDef

public AttributeDef getAttributeDef(int index)
Description copied from class: RowDef
Gets an attribute definition, given its index.

Specified by:
getAttributeDef in interface StructureDef
Specified by:
getAttributeDef in class RowDef
Parameters:
index - the index of an AttributeDef, where the leftmost attribute has index zero.
Returns:
an attribute definition.

getColumnNameForQuery

public java.lang.String getColumnNameForQuery(int index)
Specified by:
getColumnNameForQuery in interface StructureDef

getAssociationDefImpl

public AssociationDefImpl getAssociationDefImpl(java.lang.String name)
Returns the AssociationDefImpl (association accessors) given the association name.

Parameters:
name - the name of the association.
Returns:
the association accessors for this object.

getAssociationDefImpl

public AssociationDefImpl getAssociationDefImpl(int index)
Returns the AssociationDefImpl (association accessors) given an index. If an invalid index number is given, this method returns null.

Parameters:
index - of the association attribute.
Returns:
the association accessors for this object; null if an invalid index number is given.

getAssociationDefImpls

public AssociationDefImpl[] getAssociationDefImpls()
Returns the AssociationDefImpls.

Returns:
the association accessors for this object.

getSource

public java.lang.String getSource()
Returns the name of the Database source table.

This method could be overridden if, for example, your application implements table generator code at runtime.

Returns:
the name of database table that this business object represents.

setUpdatable

public void setUpdatable(boolean flag)
Internal: Applications should not use this method.

Set false if this entity has to be readOnly (e.g., when this entity is mapping a snapshot table.) Default is true.

Parameters:
flag -

isUpdatable

public boolean isUpdatable()
Internal: Applications should not use this method.

Returns false if this entity has to be readOnly (e.g., when this entity is mapping a snapshot table.) Default is true.


setSource

public void setSource(java.lang.String source)
Internal: Applications should not use this method.

Sets the name of the Database source table.

Parameters:
source - the name of database table corresponding to this business object.

isObjectTable

public boolean isObjectTable()
Determines whether this is an Object table.

This method returns true if this table is:

Returns:
true if this is an object table; false otherwise.

getSourceType

public java.lang.String getSourceType()
Internal: Applications should not use this method.

Returns the name of the database source type.

Returns:
the type of database source.

setSourceType

public void setSourceType(java.lang.String sourceType)
Internal: Applications should not use this method.

Sets the name of the Database source type.

Parameters:
sourceType - the type of database source.

getEJBHomeJNDIName

public java.lang.String getEJBHomeJNDIName()

setEJBHomeJNDIName

public void setEJBHomeJNDIName(java.lang.String nam)

getEJBAppProviderURL

public java.lang.String getEJBAppProviderURL()

getEventNamespace

public java.lang.String getEventNamespace()

setEventNamespace

public void setEventNamespace(java.lang.String namespace)

getEventPayloadNamespace

public java.lang.String getEventPayloadNamespace()

setEventPayloadNamespace

public void setEventPayloadNamespace(java.lang.String namespace)

setEJBAppProviderURL

public void setEJBAppProviderURL(java.lang.String url)

getBatchThreshold

public int getBatchThreshold()

setBatchThreshold

public void setBatchThreshold(int threshold)

getAllEntityInstances

public java.util.Iterator getAllEntityInstances(DBTransaction tr)
Deprecated. since 5.0 use getAllEntityInstancesIterator.

Creates an iterator for stepping through instances of Entities of this definition object type. This method could typically be used in a cache clean-up routine.

Parameters:
tr - the transaction containing the Entity Objects.
Returns:
the iterator.

getAllEntityInstancesIterator

public java.util.Iterator getAllEntityInstancesIterator(DBTransaction tr)
Creates an iterator for stepping through instances of Entities of this definition object type. This method could typically be used in a cache clean-up routine.

Parameters:
tr - the transaction containing the Entity Objects.
Returns:
the iterator.

getRowClass

public java.lang.Class getRowClass()
Gets the implementation class of this Entity's rows. For example, if this method is called on the Dept Entity Object, it will return DeptImpl.

Specified by:
getRowClass in class RowDef
Returns:
the row implementation class.

getCollClass

public java.lang.Class getCollClass()
Gets the implementation class of this Entity's collection.

Returns:
the collection implementation class.

findInCacheByPKExtended

public EntityImpl findInCacheByPKExtended(DBTransaction txn,
                                          Key key,
                                          boolean inclSubclasses)

findInCacheByAltKeyExtended

public EntityImpl findInCacheByAltKeyExtended(DBTransaction txn,
                                              java.lang.String keyName,
                                              Key key,
                                              boolean inclSubclasses)

findInCacheByPrimaryKey

public EntityImpl findInCacheByPrimaryKey(DBTransaction txn,
                                          Key key)
Returns an Entity Object in EntityCache given a Primary Key.

Given the name of the databse transaction and the table's primary key, this method returns the associated Entity Object if it exists in the Entity cache. This method will not cause a fault-in of an entity from the database.

This method returns null if the Entity Object is not found.

Parameters:
txn - the transaction containing the Entity Object.
key - the Primary Key.
Returns:
the Entity Object matching Key, or null if not found.

findByPKExtended

public EntityImpl findByPKExtended(DBTransaction txn,
                                   Key key,
                                   boolean inclSubclasses)

findByPrimaryKey

public EntityImpl findByPrimaryKey(DBTransaction txn,
                                   Key key)
Finds an Entity Object given a Primary Key.

Given the name of the databse transaction and the table's primary key, this method returns the associated Entity Object. If the Entity has not already been brought into the cache by any of the View Objects, this method will cause the Entity to be fetched from the database.

This method returns null if the Entity Object is not found.

Parameters:
txn - the transaction containing the Entity Object.
key - the Primary Key.
Returns:
the Entity Object matching Key, or null if not found.

findByAltKey

public EntityImpl findByAltKey(DBTransaction txn,
                               java.lang.String keyName,
                               Key key,
                               boolean inclSubclasses,
                               boolean searchDatabase)

createKey

public Key createKey(AttributeList al)
Given a set of attribute values (name-value pairs), creates a Primary key object for this Entity. This method could be used to create the input for the findByPrimaryKey method. If the key cannot be created, this method returns null.

Returns:
the key with ordered attribute list values according to this definition; null if the key cannot be created.

newInstance2

public EntityImpl newInstance2(DBTransaction txn)
Internal: Applications should not use this method.

Used internally to create a new row and then create() is called from viewrow.create().


newInstance

protected EntityImpl newInstance(DBTransaction txn)

createInstance2

public EntityImpl createInstance2(DBTransaction txn,
                                  AttributeList al)
Instantiate an instance of the Entity. The default values of the entity attributes are filled in in this method.

Override this method to create instances of composite Entities.

Parameters:
txn - the DBTransaction instance for the Entity.
al - List of attribute name/value pairs to be passed to Entity.create()
Returns:
a new instance of the Entity.
See Also:
EntityImpl.create(AttributeList)

createInstance

protected EntityImpl createInstance(DBTransaction txn,
                                    AttributeList al)

createBlankInstance2

public EntityImpl createBlankInstance2(DBTransaction txn)
Internal: Applications should not use this method.

Internal method invoked whenever an Entity of this type is created within the framework.

Parameters:
txn - the Database Transaction Object.
Returns:
EntityImpl an instance of the Entity Object.

createBlankInstance

protected EntityImpl createBlankInstance(DBTransaction txn)

setRowClass

public void setRowClass(java.lang.Class rowClass)
Internal: Applications should not use this method.

Sets the implementation class for this Entity's rows.

Parameters:
rowClass - the row implementation class.

setCollClass

public void setCollClass(java.lang.Class collClass)
Internal: Applications should not use this method.

Sets the implementation class for this Entity's collection.

Parameters:
collClass - the collection implementation class.

getBaseComponentClass

public java.lang.Class getBaseComponentClass()
Internal: Applications should not use this method.

Returns the class of the reference object.

Returns:
the class of the reference object.

getForeignKeyAttrs

protected AttributeDefImpl[] getForeignKeyAttrs()
Returns the list of AttributeDefs that make the foreign key for the composition cases. For example, in the case of Dept/Emp, this method returns the Deptno AttributeDef on the Emp EntityDef.

Returns:
an array of primary key attribute descriptors.

getPrimaryKeys

protected AttributeDefImpl[] getPrimaryKeys()
Returns the AttributeDef's that define the primary key.

Specified by:
getPrimaryKeys in class RowDef
Returns:
an array attribute definitions for the primary key.

getOIDAttribute

protected AttributeDefImpl getOIDAttribute()
Internal: Applications should not use this method.

Returns the object identifier attribute (OID). This method is used to return attributes that are Oracle Objects.

Returns:
the object identifier attribute (OID) for this Entity.

getRetrievedOnInsertAttributes

protected AttributeDefImpl[] getRetrievedOnInsertAttributes()
Returns the list of attributes for which the Refresh on Insert flag is enabled at Design Time. Primary keys are excluded from the list even if they are marked Refresh on Insert. This method should not be overridden.

Returns:
a list of attributes whose values are refreshed on insert.

getRetrievedOnUpdateAttributes

protected AttributeDefImpl[] getRetrievedOnUpdateAttributes()
Returns the list of attributes for which the Refresh on Update flag is enabled at Design Time. Primary keys are excluded from the list even if they are marked Refresh on Update. This method should not be overridden.

Returns:
a list of attributes whose values are refreshed on update.

getRetrievedOnInsertPrimaryKeys

protected AttributeDefImpl[] getRetrievedOnInsertPrimaryKeys()
Returns the list of primary keys for which the Refresh on Insert flag is enabled at Design Time. This method should not be overridden.

Returns:
a list of primary key attributes whose values are refreshed on insert.

getRetrievedOnUpdatePrimaryKeys

protected AttributeDefImpl[] getRetrievedOnUpdatePrimaryKeys()
Returns the list of primary key attributes for which the Refresh on Update flag is enabled at Design Time. This method should not be overridden.

Returns:
a list of primary key attributes whose values are refreshed on update.

getUniqueKeys

public AttributeDefImpl[] getUniqueKeys()
Returns the list of attributes that were marked as Unique-key constituents in designtime The order of attribute definitions is the order in which the unique-key attributes appear in the set of attributes for this entity. Only "Persistent" attributes can be marked as Unique Key attributes.


getChangeIndicatorColumn

protected AttributeDefImpl getChangeIndicatorColumn()
Returns the AttributeDef for the Change Indicator column for the datasource. It returns null if the the column does not exist.

The Change Indicator column is used, in some applications, to indicate changes in the underlying row in the datastore. It usually takes the form of a Timestamp or a Counter and, is compared at change time, against the value in the cache, to check for consistency.

Returns:
the Change Indicator column or null if none exists.

getChangeIndicatorColumn2

public AttributeDefImpl getChangeIndicatorColumn2()

setChangeIndicatorColumn

public void setChangeIndicatorColumn(AttributeDefImpl chgIndCol)

isUpdateChangedColumns

public boolean isUpdateChangedColumns()
Determines whether the SQL generation of UPDATE statements should include all of the columns or just the changed columns.

The return value of this flag indicates whether the SQL Generation of UPDATE statements should include all of the columns or just the changed columns. If this method returns true then only the updated columns will be included, otherwise the method will include all of the columns that are present.

Returns:
true if only changed columns are used in SQL generation; false if all columns are used.

setUpdateChangedColumns

public void setUpdateChangedColumns(boolean updateChangedColumns)
Sets the flag for status to update on Changed Columns


isUseGlueCode

public boolean isUseGlueCode()

setUseGlueCode

public void setUseGlueCode(boolean b)

getSelectClause

public java.lang.String getSelectClause(SQLBuilder sqlBuilder)

getSelectClause

public java.lang.String getSelectClause(SQLBuilder sqlBuilder,
                                        boolean forViewObject)

getQuery

public java.lang.String getQuery()
Returns the query that will return all columns for this Entity. Override this method to provide your own query, perhaps specifying another datasource or a different collection of columns.

Returns:
the SQL query statement.

addPropertyChangeListener

protected void addPropertyChangeListener(int index,
                                         PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for an attribute at the given index.

This method modifies the static/singleton metadata.

Parameters:
index - the index of the attribute to which the listener is to be added.
listener - the PropertyChangeListener to be added.
See Also:
PropertyChangeListener

addPropertyChangeListener

protected void addPropertyChangeListener(java.lang.String attributeName,
                                         PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for an attribute of the given Name.

This method modifies the static/singleton metadata.

Parameters:
attributeName - the name of the attribute to which the listener is to be added.
listener - the PropertyChangeListener to be added.
See Also:
PropertyChangeListener

removePropertyChangeListener

protected void removePropertyChangeListener(int index,
                                            PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list of the given attribute (by index).

This method modifies the static/singleton metadata.

Parameters:
listener - the PropertyChangeListener to be removed.
See Also:
PropertyChangeListener

removePropertyChangeListener

protected final void removePropertyChangeListener(java.lang.String attributeName,
                                                  PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list of the given attribute (by index).

This method modifies the static/singleton metadata.

Parameters:
attributeName - the attribute to which the listener is to be added.
listener - the PropertyChangeListener to be removed.
See Also:
PropertyChangeListener

removeValidator

protected void removeValidator(JboValidatorInterface listener)
Removes a VetoableChangeListener from the listener list.

This method modifies the static/singleton metadata.

Parameters:
listener - the VetoableChangeListener to be removed.
See Also:
VetoableChangeListener

getValidators

public java.util.ArrayList getValidators()
Get the list of JboValidatorInterface objects registered with this entity

Specified by:
getValidators in interface ValidationManager
Returns:
ArrayList List of Validators

lookupValidator

public JboValidatorInterface lookupValidator(java.lang.String name)

addValidator

public void addValidator(JboValidatorInterface listener)
Adds a JboValidatorInterface to the listener list.

This method modifies the static/singleton metadata.

Specified by:
addValidator in interface ValidationManager
Parameters:
listener - the JboValidatorInterface to be added.
See Also:
JboValidatorInterface

getTriggersOfType

public java.util.ArrayList getTriggersOfType(TriggerType type)
Internal: Applications should not use this method. *

For internal use only. Application developers should not use this

addTrigger

public void addTrigger(TriggerType type,
                       JboValidatorInterface listener)
Internal: Applications should not use this method. *

For internal use only. Application developers should not use this

removeTrigger

public void removeTrigger(TriggerType trig,
                          java.lang.String valName)
Internal: Applications should not use this method. *

For internal use only. Application developers should not use this

addVetoableChangeListener

protected void addVetoableChangeListener(VetoableChangeListener listener)
This method will be deprecated in a future release. Use add/removeValidator instead.

Adds a VetoableChangeListener to the listener list.

This method modifies the static/singleton metadata.

Parameters:
listener - the VetoableChangeListener to be added.
See Also:
VetoableChangeListener

addVetoableChangeListener

protected void addVetoableChangeListener(int index,
                                         VetoableChangeListener listener)
This method will be deprecated in a future release. Use AttributeDefImpl.add/removeValidator instead.

Adds a VetoableChangeListener to the listener list for an attribute at the given index. Use this method to add a validator to an attribute.

This method modifies the static/singleton metadata.

Parameters:
index - the index of the attribute to which the listener is to be added.
listener - the VetoableChangeListener to be added.
See Also:
VetoableChangeListener

addVetoableChangeListener

protected void addVetoableChangeListener(java.lang.String attributeName,
                                         VetoableChangeListener listener)
This method will be deprecated in a future release. Use AttributeDefImpl.add/removeValidator instead.

Adds a VetoableChangeListener to the listener list for an attribute of the given name.

This method modifies the static/singleton metadata.

Parameters:
attributeName - the attribute to which the listener is to be added.
listener - the VetoableChangeListener to be added.
See Also:
VetoableChangeListener

removeVetoableChangeListener

protected void removeVetoableChangeListener(VetoableChangeListener listener)
This method will be deprecated in a future release. Use add/removeValidator instead.

Removes a VetoableChangeListener from the listener list.

This method modifies the static/singleton metadata.

Parameters:
listener - the VetoableChangeListener to be removed.
See Also:
VetoableChangeListener

removeVetoableChangeListener

protected void removeVetoableChangeListener(int index,
                                            VetoableChangeListener listener)
This method will be deprecated in a future release. Use AttributeDefImpl.add/removeValidator instead.

Removes a VetoableChangeListener from the listener list of the given attribute (by index).

This method modifies the static/singleton metadata.

Parameters:
index - the index of the attribute from which the listener is to be removed.
listener - the VetoableChangeListener to be removed.
See Also:
VetoableChangeListener

removeVetoableChangeListener

protected final void removeVetoableChangeListener(java.lang.String attributeName,
                                                  VetoableChangeListener listener)
This method will be deprecated in a future release. Use AttributeDefImpl.add/removeValidator instead.

Removes a VetoableChangeListener from the listener list of the given attribute (by index).

This method modifies the static/singleton metadata.

Parameters:
attributeName - the attribute to which the listener is to be added.
listener - the VetoableChangeListener to be removed.
See Also:
VetoableChangeListener

finishedLoading

protected void finishedLoading()
Overrides:
finishedLoading in class DefObject

resolveReferences

protected void resolveReferences()
Since this gets called from lazyload, load all attribute accessors upfront.

Overrides:
resolveReferences in class DefObject

createEntityDef

public static EntityDefImpl createEntityDef(int defScope,
                                            java.lang.String defClassName,
                                            java.lang.String dbObjName,
                                            java.lang.String viewObjectBase)

loadFromXML

protected static EntityDefImpl loadFromXML(DefElement xmlElement,
                                           EntityDefImpl eInfo,
                                           EntityDefImpl baseEntityDef,
                                           boolean loadingBaseDef)
Create the EntityDefImpl from XML metadata stream

Parameters:
xmlElement - The XML element to load from.
eInfo - EntityDefImpl to be instantiated and returned
baseEntityDef - Base entity def
Returns:
the loaded entity def.

loadXMLContents

public void loadXMLContents(DefElement xmlElement,
                            java.lang.String fullName)

resolveDefObject

public void resolveDefObject()
This method performs final resolution of various parts of the entity definition before this definition object can be used.

Specified by:
resolveDefObject in class MetaObject

createAltKey

protected KeyDef createAltKey(java.lang.String keyName,
                              int keyIndex,
                              java.lang.String[] components)
Specified by:
createAltKey in class RowDef

getEventDef

public EventDef getEventDef(java.lang.String name)
Gets the request event definition. An event definitions represents an event in Fabric that we will raise at the appropriate event point, as specified by the event mappings for the entity.

Parameters:
name - - name of the event definition
Returns:
the requested event definition

addEventAttr

public void addEventAttr(java.lang.String attrName)

getCreateEvents

public java.util.Iterator<EventMapping> getCreateEvents()
Returns the list of events to fire when a row is created in the entity.

Returns:
the list of events to fire when a row is created in the entity.

getUpdateEvents

public java.util.Iterator<EventMapping> getUpdateEvents()
Returns the list of events to fire when a row is updated in the entity.

Returns:
the list of events to fire when a row is updated in the entity.

getDeleteEvents

public java.util.Iterator<EventMapping> getDeleteEvents()
Returns the list of events to fire when a row is deleted in the entity.

Returns:
the list of events to fire when a row is deleted in the entity.

getEventParentAttrs

public java.util.Iterator getEventParentAttrs()
Gets the list of attributes on the parent entity that are used in the payload of events on this entity.

Returns:
the list of attributes on the parent entity that are used in the payload of events in this entity.

getEventTransAttrs

public java.util.Iterator getEventTransAttrs()

getExtendedDefObjects

public java.util.ArrayList getExtendedDefObjects(boolean bSkipBusLogicUnits)

addAssocAccessor

public AssociationDefImpl addAssocAccessor(java.lang.String accName,
                                           java.lang.String assocName,
                                           java.lang.Class javaType)

addAttribute

public AttributeDefImpl addAttribute(java.lang.String attrName,
                                     java.lang.String columnName,
                                     java.lang.Class javaType,
                                     boolean isPrimaryKey,
                                     boolean isDiscriminator,
                                     boolean isPersistent)

addAttributeOfKind

public AttributeDefImpl addAttributeOfKind(java.lang.String attrName,
                                           java.lang.String columnName,
                                           java.lang.Class javaType,
                                           boolean isPrimaryKey,
                                           boolean isDiscriminator,
                                           byte kind)

loadAttribute

protected void loadAttribute(DefElement elem)
Load the attributes from the XMLInput Stream

Parameters:
elem - : BC4J Entity

getDefXMLElementTag

public java.lang.String getDefXMLElementTag()
Specified by:
getDefXMLElementTag in interface PersistentDefinition
Overrides:
getDefXMLElementTag in class PersistableDefObject

writeChildren

public void writeChildren(DefWriter jos)
Description copied from interface: PersistentDefinition
Writes the Object's children to the Persistent storage

Specified by:
writeChildren in interface PersistentDefinition
Overrides:
writeChildren in class RowDef
Parameters:
jos - the Output storage for persistence

writeContents

public void writeContents(DefWriter jos)
Description copied from interface: PersistentDefinition
Objects should write their persistence output in this method

Specified by:
writeContents in interface PersistentDefinition
Parameters:
jos - the Output storage for persistence

isRefPKBased

public boolean isRefPKBased()
Indicates whether this Entity's REF is primary key based or not. This method is meaningful only for an Entity whose base table is an Oracle object table. For such an Entity, a question arises whether the object reference ("REF") for the table is primary key based or not. This method returns true if it is.

Returns:
a flag indicating whether the underlying object table's REF is primary key based or not.

setRefPKBased

public void setRefPKBased(boolean val)
Internal: Applications should not use this method.

Sets a flag that indicates whether this Entity's REF is primary key based or not. This method is meaningful only for an Entity whose base table is an Oracle object table. For such an Entity, a question arises whether the object reference ("REF") for the table is primary key based or not. This method sets this flag.

Parameters:
val - should be true if the underlying object table's REF is primary key based. Otherwise, false.

getRefAttrIndex

public int getRefAttrIndex()

isRowIDPrimaryKey

protected boolean isRowIDPrimaryKey()
Determines whether this Entity Object has a ROWID attribute that is used as a primary key. Returns true if the ROWID attribute has been marked as a primary key.

Returns:
true if the ROWID attribute is used as primary key; false otherwise.

isOIDInPrimaryKey

protected boolean isOIDInPrimaryKey()
Determines whether the OID (object identifier) attribute is a primary key. Use this method for tables that contain Oracle Objects. It returns true if an OID attribute has been marked as a primary key.

Returns:
true if OID is used as primary key; false otherwise.

isAssociationAccessorRetained

public boolean isAssociationAccessorRetained()

setAssociationAccessorRetained

public void setAssociationAccessorRetained(boolean b)

getDefTypeId

public int getDefTypeId()
Specified by:
getDefTypeId in class DefObject

setDefForComponent

protected void setDefForComponent(ComponentObjectImpl comp)
Specified by:
setDefForComponent in class DefObject

unsetDefForComponent

protected void unsetDefForComponent(ComponentObjectImpl comp)
Specified by:
unsetDefForComponent in class DefObject

addUniquePKValidation

protected void addUniquePKValidation()
Adds validators to each primary key attribute of this Entity to ensure that the primary key for an Entity is always unique.

Whenever any of the primary key attribute values change, this validation rule is invoked to validate, both in the cache and the database, that the new key does not belong to any other Entity of this type. If the key is found in one of the Entities, a TooManyObjectsException is thrown.

Subclasses should invoke this method in their createDef() method to add these validators. By default, the framework does not invoke the unique key check. For example, you can add a validator to look for duplicate keys. To do this, follow these instructions:

  1. In entity wizard, during Design Time, click the Entity Definition Class's "Generate Java File" checkbox.
  2. In the Entity DefImpl's .java source file (xxxDefImpl.java), override protected void createDef() and make a call to addUniquePKValidation(). For example:

     protected void createDef()
       {
         addUniquePKValidation();
        }
     
    This enables validation to check if the modified primary key value exists in either the database or the cache.

An alternative way to apply this validator in designtime is to edit the entity in designtime and apply UniqueKeyValidator to the entity in the Rules Tab.

Throws:
TooManyObjectsException - if a duplicate key is found.
See Also:
createDef(), TooManyObjectsException

addUniqueKeyValidation

protected void addUniqueKeyValidation(JboUniqueKeyValidator val)

addUniqueKeyValidator

public void addUniqueKeyValidator(JboUniqueKeyValidator val)
Add a unique key validator. Unique key validators require special handling and this method must be called to add them during DT@RT.

Parameters:
val - : Unique key validator to add.

loadCustomDef

protected void loadCustomDef(DefElement xmlElement)
                      throws PersistenceException
Internal: Applications should not use this method.

Loads a custom Entity definition from the associated XML file. For example, add custom attributes or additional metadata to an Entity's XML file. Then use this method to load the new definition of the Entity definition.

Typically, a call to createDef() follows this method.

Parameters:
xmlElement - the root XML node for the Entity.
Throws:
PersistenceException - if an error occurred while loading the XML files at runtime.
See Also:
createDef()

hasLOBAttrs

protected boolean hasLOBAttrs()
Determines whether the EntityDef contains attributes that are LOBs.

This method is used by doDML to determine if the EntityDef contains LOB attributes. If it does, doDML calls doDMLWithLOBs to process the DML request. For example:

  protected void doDML(int operation, TransactionEvent e)
 {
   if (!getEntityDef().hasLOBAttrs())
   {
      getSQLBuilder().doEntityDML(this,operation,e);
   }
   else
   {
      doDMLWithLOBs(operation, e);
   }
 }
 
Developers who implement doDML() to handle the two-phase insert and update process, should override hasLOBAttrs() in the EntityDefImpl subclass and return false. This will cause doDML() to work properly with the current release.

Returns:
true if the Entity contains LOB attributes; false otherwise.
See Also:
doDML, doDMLWithLOBs

getMaxAttrConst

public static int getMaxAttrConst(java.lang.String entityName)
Returns the index of the last attribute for this entity at runtime.

The framework's Extends feature lets developers add information, such as additional attributes and validation, to an existing Entity. The additional attributes are "appended" to the original Entity's list of attributes. The framework adds this method to the generated extended Entity's *Impl file and uses it at runtime to determine the index of the last attribute belonging to the original Entity. All of the attributes with index greater than this number belong to the extended Entity.

The following code snippet represents part of the class definition of the *Impl file generated by the framework for the extended Entity Object newEmp:

 public class newEmpImpl extends package27.EmpImpl {
    protected static final int MAXATTRCONST =
                         EntityDefImpl.getMaxAttrConst("package27.Emp");
  ...
 
The getMaxAttrConst method returns the index of the last attribute from the EntityDefImpl belonging to the original Entity Emp in package27. The result is stored in the constant MAXATTRCONST. This constant is used in calculations later in the file.

Parameters:
entityName - the name of the Entity for which the index of the last attribute is retrieved.

checkEntityLocked

public static boolean checkEntityLocked(Row en)
Internal: Applications should not use this method. Called by BaseLobDomain to check for entity's locked state in local mode using reflection rather than direct call as Domains need to be "server" independent.


getEJBHome

public java.lang.Object getEJBHome()

isSingleUseKeyStatement

public boolean isSingleUseKeyStatement()

setSingleUseKeyStatement

public void setSingleUseKeyStatement(boolean singleUse)

setUseReturningClause

protected void setUseReturningClause(boolean flag)
Subclasses should call this method with false, on the EntityDef to indicate that this entity type should not use RETURNING clause to fetch refresh-on-insert or refresh-on-update values.

By default, this flag is set. If a subclass resets this flag, then callable statements for insert/update DML on entities of this type will contain a separate SELECT statement to fetch the refresh-on-insert or update attributes. In that case, Entity.getRefreshSQLKeyAttrs() is used to get the list of attributes to create the WHERE clause for this extra SELECT statement.


isUseReturningClause

public boolean isUseReturningClause()
Indicates if DML should use the RETURNING clause for this entity type. By default this flag is true. This flag is not used when Oracle SQLBuilder is not in use.


isEffectiveDated

public boolean isEffectiveDated()
Checks if this Entity definition is Effective Dated.

Overrides:
isEffectiveDated in class RowDef
Returns:
true if the Entity definition has both effective start date and effective end date attributes, false otherwise.

hasEffectiveDateSequence

public boolean hasEffectiveDateSequence()
Returns:
true if this Entity contains Effective Sequence attributes used in Multiple Changes Per Day.

getEffectiveStartDateAttr

public AttributeDefImpl getEffectiveStartDateAttr()
Returns:
The attribute that represents the effective start date

getEffectiveEndDateAttr

public AttributeDefImpl getEffectiveEndDateAttr()
Returns:
The attribute that represents the effective end date

getEffectiveDateTransientAttr

public AttributeDefImpl getEffectiveDateTransientAttr()
Description copied from class: RowDef
Retuns the Attribute definition that stores the Effective Date value in a row. This method is overridden in ViewDefImpl and EntityDefImpl.

Overrides:
getEffectiveDateTransientAttr in class RowDef
Returns:
The attribute that is used to store effective date on a row

getEffectiveDateSequenceAttr

public AttributeDefImpl getEffectiveDateSequenceAttr()
Returns:
The attribute that represents the effective date sequence

getEffectiveDateSequenceFlagAttr

public AttributeDefImpl getEffectiveDateSequenceFlagAttr()
Returns:
The attribute that represents the effective date sequence marker

getEffectiveDateTransientAttrName

protected java.lang.String getEffectiveDateTransientAttrName()
The name of the transient attribute that is used to lookup the effective date of a row while doing DML operations.

Returns:
The name of the attribute

getEffDtPreviousRowsVOName

protected java.lang.String getEffDtPreviousRowsVOName()
The name of the View Object that is generated to query the rows that precedes an effective dated row and has the same primary key values.

Returns:
The name of the View Object

getEffDtNextRowsVOName

protected java.lang.String getEffDtNextRowsVOName()
The name of the View Object that is generated to query the rows that follow an effective dated row and has the same primary key values.

Returns:
The name of the View Object

getPrevEffSequenceRowsVOName

protected java.lang.String getPrevEffSequenceRowsVOName()
The name of the View Object used to query effective dated rows with lower sequence values within the same effective start date (used in Multiple Changes Per Day).

Returns:
The name of the View Object

getNextEffSequenceRowsVOName

protected java.lang.String getNextEffSequenceRowsVOName()
The name of the View Object used to query effective dated rows with higher sequence values within the same effective start date (used in Multiple Changes Per Day).

Returns:
The name of the View Object

getEffectiveDateType

public byte getEffectiveDateType()
Returns the Effective Date type of the Entity definition.

Returns:
EntityDefImpl.EFFECTIVE_DATE_TYPE_EFFECTIVE_DATED , EntityDefImpl.EFFECTIVE_DATE_TYPE_DATED or EntityDefImpl.EFFECTIVE_DATE_TYPE_NONE

setEffectiveDateType

public void setEffectiveDateType(byte effDtType)
Sets the Effective Date Type for this Entity definition. Valid types are EntityDefImpl.EFFECTIVE_DATE_TYPE_EFFECTIVE_DATED , EntityDefImpl.EFFECTIVE_DATE_TYPE_DATED or EntityDefImpl.EFFECTIVE_DATE_TYPE_NONE . If the effective dated type is changed from EntityDefImpl.EFFECTIVE_DATE_TYPE_NONE then the framework assumes that there are start and end effective date attributes specified for this entity.

Parameters:
effDtType - EntityDefImpl.EFFECTIVE_DATE_TYPE_EFFECTIVE_DATED , EntityDefImpl.EFFECTIVE_DATE_TYPE_DATED or EntityDefImpl.EFFECTIVE_DATE_TYPE_NONE

getLowestEffDtSequenceValue

public static java.lang.Integer getLowestEffDtSequenceValue()
Returns:
The lowest sequence value used to represent earliest change of the day in effective-dated entities that allow Multiple Changes Per Day.

getCurrentSequencedRowChar

public static java.lang.String getCurrentSequencedRowChar()
Returns:
Character value used to represent current effective-dated sequenced row in Multiple Changes Per Day.

getPriorSequencedRowChar

public static java.lang.String getPriorSequencedRowChar()
Returns:
Character value used to represent effective-dated sequenced rows that are not current in Multiple Changes Per Day.

hasDataSecurity

public boolean hasDataSecurity()
Specified by:
hasDataSecurity in class RowDef

loadViewAccessors

protected void loadViewAccessors(DefElement xmlElement)
Overrides:
loadViewAccessors in class RowDef

getPermissionDef

public oracle.adf.share.security.binding.BindingPermissionDef getPermissionDef()
Internal: Applications should not use this method.

Returns the security metadata for this Entity.


setPermissionDef

public void setPermissionDef(oracle.adf.share.security.binding.BindingPermissionDef permDef)

getDataSecurityAttribute

public AttributeDefImpl getDataSecurityAttribute()
Internal: Applications should not use this method.


getHintValue

public java.lang.String getHintValue(LocaleContext locale,
                                     java.lang.String sHintName)

getProperty

public java.lang.Object getProperty(java.lang.String hintName)
Description copied from class: NamedObjectImpl
Retrieves the specified property, if it exists.

Overrides:
getProperty in class NamedObjectImpl
Parameters:
hintName - a string to be used as a hash table key.
Returns:
the value associated with hintName, if any, otherwise null.

getComponentClass

public java.lang.Class getComponentClass()

setComponentClass

public void setComponentClass(java.lang.Class refClass)

setComponentInterfaceName

public void setComponentInterfaceName(java.lang.String interfaceName)

getComponentInterfaceName

public java.lang.String getComponentInterfaceName()

getClientProxyClassName

public java.lang.String getClientProxyClassName()

setClientProxyClassName

public void setClientProxyClassName(java.lang.String name)

getEffectiveClientProxyClassName

protected java.lang.String getEffectiveClientProxyClassName()

getEffectiveComponentInterfaceName

protected java.lang.String getEffectiveComponentInterfaceName()

loadFromXML

protected static void loadFromXML(DefElement xmlElement,
                                  oracle.jbo.server.RemotableCompDef defObj)

getOperationDefinitions

public OperationDefinitionsImpl getOperationDefinitions()
Deprecated. 

For internal framework use only.

Specified by:
getOperationDefinitions in interface OperationDefinitionContainer

getRowOperationDefinitions

public OperationDefinitionsImpl getRowOperationDefinitions()
Deprecated. 

For internal framework use only.


lookupOperationDefinition

public OperationDefinitionImpl lookupOperationDefinition(java.lang.String id)
Deprecated. 

For internal framework use only.


findOperationDefinition

public OperationDefinitionImpl findOperationDefinition(java.lang.String id)
Deprecated. 

For internal framework use only.


lookupRowOperationDefinition

public OperationDefinitionImpl lookupRowOperationDefinition(java.lang.String id)
Deprecated. 

For internal framework use only.


findRowOperationDefinition

public OperationDefinitionImpl findRowOperationDefinition(java.lang.String id)
Deprecated. 

For internal framework use only.


addOperation

public void addOperation(OperationDefinitionImpl opDef)
Deprecated. 

For internal framework use only.


addRowOperation

public void addRowOperation(OperationDefinitionImpl opDef)
Deprecated. 

For internal framework use only.


addGroovyOperation

public OperationDefinitionImpl addGroovyOperation(java.lang.String id,
                                                  java.lang.String name,
                                                  java.lang.String returnType,
                                                  java.util.LinkedHashMap<java.lang.String,java.lang.String> params,
                                                  java.lang.String body)
Deprecated. 

For internal framework use only.


addGroovyRowOperation

public OperationDefinitionImpl addGroovyRowOperation(java.lang.String id,
                                                     java.lang.String name,
                                                     java.lang.String returnType,
                                                     java.util.LinkedHashMap<java.lang.String,java.lang.String> params,
                                                     java.lang.String body)
Deprecated. 

For internal framework use only.


removeOperation

public void removeOperation(OperationDefinitionImpl opDef)
Deprecated. 

For internal framework use only.


removeRowOperation

public void removeRowOperation(OperationDefinitionImpl opDef)
Deprecated. 

For internal framework use only.


loadOperationDefinitions

protected final void loadOperationDefinitions(DefElement xmlElement)
Deprecated. 

For internal framework use only.


Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

Copyright © 1997, 2011, Oracle. All rights reserved.