|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.common.BaseObject | +--oracle.jbo.server.NamedObjectImpl | +--oracle.jbo.server.DefObject | +--oracle.jbo.server.RowDef | +--oracle.jbo.server.EntityDefImpl
Defines metadata for Entity Object classes.
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
|
protected java.util.Vector |
mAssocAccessors
The Association accessors for the Entity object |
protected java.util.Vector |
mAssocs
Association objects for the Entity object |
protected java.util.Vector |
mAttrAccessors
The Attribute accessors for the Entity object |
protected boolean |
mIsObjectTable
Is Object Table or not |
protected AttributeDefImpl |
mOIDAttribute
If entity is a OIDObject |
protected AttributeDefImpl[] |
mPrimaryKeys
List of attributes that make the primary key |
protected java.lang.String |
mSource
To keep the name of the database source : The database entity for the Entity Object |
protected java.lang.String |
mSourceType
To keep the database source type |
Fields inherited from class oracle.jbo.server.DefObject |
mCompUsageList,
mCompUsages |
Fields inherited from class oracle.jbo.server.NamedObjectImpl |
mFullName,
mName,
mParent,
mProperties |
Fields inherited from class oracle.jbo.common.BaseObject |
TRACE_EVERY_ALLOC,
TRACE_NONE,
TRACE_OCCASIONAL,
TRACE_UNINITIALIZED |
Constructor Summary | |
protected |
EntityDefImpl()
Default Constructor, set the row class |
Method Summary | |
protected void |
addEntityAssociation(EntityAssociation assoc)
Add an EntityAssociation to this Entity. |
protected void |
addPropertyChangeListener(int index,
oracle.jbo.server.util.PropertyChangeListener listener)
Utility method to Add a PropertyChangeListener to the listener list
for an attribute at the given index. |
protected void |
addPropertyChangeListener(java.lang.String attributeName,
oracle.jbo.server.util.PropertyChangeListener listener)
Utility method to Add a PropertyChangeListener to the listener list
for an attribute of the given Name
|
protected void |
addUniquePKValidation()
Adds validators to each primary key attribute of this entity to validate that the primary-key for an entity is always unique. |
protected void |
addVetoableChangeListener(int index,
oracle.jbo.server.util.VetoableChangeListener listener)
Utility method to Add a VetoableChangeListener to the listener list
for an attribute at the given index
|
protected void |
addVetoableChangeListener(java.lang.String attributeName,
oracle.jbo.server.util.VetoableChangeListener listener)
Utility method to Add a VetoableChangeListener to the listener list
for an attribute of the given Name
|
protected void |
addVetoableChangeListener(oracle.jbo.server.util.VetoableChangeListener listener)
Utility method to Add a VetoableChangeListener to the listener list. |
protected EntityImpl |
createBlankInstance(DBTransaction txn)
Internal method invoked whenver an entity of this type is created within the framework. |
protected void |
createDef()
This method should be used to perform custom-metadata initialization in a subclass of EntityDefImpl. |
protected EntityImpl |
createInstance(DBTransaction txn,
AttributeList al)
Instantiate an instance of the Entity . |
Key |
createKey(AttributeList al)
Given a set of name-value pairs, creates a Primary key object for this entity. |
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. |
java.lang.String |
getAliasName()
|
oracle.jbo.server.java.util.Iterator |
getAllEntityInstances(DBTransaction tr)
Creates an iterator for stepping through instances of this definition. |
protected oracle.jbo.server.AssociationDefImpl |
getAssociationDefImpl(int index)
Get the AssociationDefImpl given an index. |
protected oracle.jbo.server.AssociationDefImpl |
getAssociationDefImpl(java.lang.String name)
Get the AssociationDefImpl given the association name. |
protected oracle.jbo.server.AssociationDefImpl[] |
getAssociationDefImpls()
Get the AssociationDefImpls. |
AttributeDefImpl |
getAttributeDefImpl(int index)
Gets an attribute definition by column position. |
AttributeDefImpl |
getAttributeDefImpl(java.lang.String attrName)
Gets the named attribute definition. |
protected AttributeDefImpl |
getAttributeDefImplByColumnName(java.lang.String colName)
Gets the attribute definition by column name. |
protected AttributeDefImpl[] |
getAttributeDefImpls()
Get the AttributeDefImpls. |
int |
getBindingStyle()
|
protected AttributeDefImpl |
getChangeIndicatorColumn()
Get the Change Indicator column for the Source. |
protected java.lang.Class |
getComponentClass()
Get the class of the reference object. |
protected EntityAssociation[] |
getEntityAssociations()
Get the EntityAssociation objects for this Entity. |
static int |
getMaxAttrConst(java.lang.String entityName)
|
protected AttributeDefImpl |
getOIDAttribute()
returns the OID Attribute |
protected AttributeDefImpl[] |
getPrimaryKeys()
Get the primary key attributes. |
java.lang.String |
getQuery()
Gets this definition's SQL query statment. |
protected AttributeDefImpl[] |
getRetrievedOnInsertAttributes()
Returns a list of retrieved on Insert Attributes, Primary keys are excluded |
protected AttributeDefImpl[] |
getRetrievedOnInsertPrimaryKeys()
|
protected AttributeDefImpl[] |
getRetrievedOnUpdateAttributes()
Return a list of retrievedOnUpdate attributes, Primary keys are excluded. |
protected AttributeDefImpl[] |
getRetrievedOnUpdatePrimaryKeys()
|
java.lang.Class |
getRowClass()
Gets the implementation class of this definition's row objects. |
protected java.lang.String |
getSource()
Get the name of the Database source table. |
protected java.lang.String |
getSourceType()
Get the name of the Database source type. |
protected boolean |
hasLOBAttrs()
|
protected boolean |
isObjectTable()
Is or is not an Object table |
protected boolean |
isOIDInPrimaryKey()
Is the OID a primary key? Returns true if OID attribute has been marked as primary key |
protected boolean |
isRowIDPrimaryKey()
Is the ROWID a primary key? Returns true if ROWID attribute has been marked as primary key |
protected boolean |
isUpdateChangedColumns()
Function to consider changed columns for SQL UPDATE generation? 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. |
protected void |
loadCustomDef(oracle.jbo.server.xml.JboElementImpl xmlElement)
|
protected void |
removePropertyChangeListener(int index,
oracle.jbo.server.util.PropertyChangeListener listener)
Utility method to Remove a PropertyChangeListener from the listener list
of the given attribute (by index)
|
protected void |
removePropertyChangeListener(java.lang.String attributeName,
oracle.jbo.server.util.PropertyChangeListener listener)
Utility method to Remove a PropertyChangeListener from the listener list
of the given attribute (by index)
|
protected void |
removeVetoableChangeListener(int index,
oracle.jbo.server.util.VetoableChangeListener listener)
Utility method to Remove a VetoableChangeListener from the listener list
of the given attribute (by index)
|
protected void |
removeVetoableChangeListener(java.lang.String attributeName,
oracle.jbo.server.util.VetoableChangeListener listener)
Utility method to Remove a VetoableChangeListener from the listener list
of the given attribute (by index)
|
protected void |
removeVetoableChangeListener(oracle.jbo.server.util.VetoableChangeListener listener)
Remove a VetoableChangeListener from the listener list. |
void |
setBindingStyle(int bindingStyle)
|
protected void |
setRowClass(java.lang.Class rowClass)
Set the class to represent instances of this Entity. |
protected void |
setSource(java.lang.String source)
Set the name of the Database source table. |
protected void |
setSourceType(java.lang.String sourceType)
Set the name of the Database source type. |
Methods inherited from class oracle.jbo.server.DefObject |
getPackageDef,
getPackageName,
isObjectResolved |
Methods inherited from class oracle.jbo.server.NamedObjectImpl |
getFullName,
getName,
getParent,
getProperties,
getPropertiesAsStrings,
getProperty,
setFullName,
setProperty |
Methods inherited from class oracle.jbo.common.BaseObject |
dumpState,
setTraceLevel,
setTraceWriter |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String DBOBJ_TYPE_TABLE
public static final java.lang.String DBOBJ_TYPE_VIEW
public static final java.lang.String DBOBJ_TYPE_OBJTYP
public static final java.lang.String DBOBJ_TYPE_OBJTAB
protected java.util.Vector mAttrAccessors
protected java.util.Vector mAssocAccessors
protected java.util.Vector mAssocs
protected AttributeDefImpl[] mPrimaryKeys
protected AttributeDefImpl mOIDAttribute
protected java.lang.String mSource
protected java.lang.String mSourceType
protected boolean mIsObjectTable
Constructor Detail |
protected EntityDefImpl()
Method Detail |
public static EntityDefImpl findDefObject(java.lang.String defFullName)
defFullName
- the fully qualified name of the definition.protected void createDef()
protected EntityAssociation[] getEntityAssociations()
protected void addEntityAssociation(EntityAssociation assoc)
assoc
- The entity assocition to be added.public AttributeDefImpl getAttributeDefImpl(java.lang.String attrName)
attrName
- the named attribute.public AttributeDefImpl getAttributeDefImpl(int index)
index
- the position of an attribute, where the leftmost has index 0.protected AttributeDefImpl getAttributeDefImplByColumnName(java.lang.String colName)
colName
- the name of the column in the database.protected AttributeDefImpl[] getAttributeDefImpls()
protected oracle.jbo.server.AssociationDefImpl getAssociationDefImpl(java.lang.String name)
protected oracle.jbo.server.AssociationDefImpl getAssociationDefImpl(int index)
index
- of the assciation attributeprotected oracle.jbo.server.AssociationDefImpl[] getAssociationDefImpls()
protected java.lang.String getSource()
protected void setSource(java.lang.String source)
name
- The name of database entity of the business object.protected boolean isObjectTable()
protected java.lang.String getSourceType()
protected void setSourceType(java.lang.String sourceType)
name
- The type of database source.public oracle.jbo.server.java.util.Iterator getAllEntityInstances(DBTransaction tr)
tr
- the transaction containing the Entity Objects.public java.lang.Class getRowClass()
public EntityImpl findByPrimaryKey(DBTransaction txn, Key key)
txn
- the transaction containing the Entity Object.key
- the Primary Key.public Key createKey(AttributeList al)
protected EntityImpl createInstance(DBTransaction txn, AttributeList al)
Entity
.
The default values of the entity attributes are filled in in this method.txn
- the DBTransaction instance for the Entity.al
- List of attribute name/value pairs to be passed to Entity.create()protected EntityImpl createBlankInstance(DBTransaction txn)
Database
- Transaction Objectprotected void setRowClass(java.lang.Class rowClass)
rowClass
- The row data classprotected java.lang.Class getComponentClass()
protected AttributeDefImpl[] getPrimaryKeys()
protected AttributeDefImpl getOIDAttribute()
protected AttributeDefImpl[] getRetrievedOnInsertAttributes()
protected AttributeDefImpl[] getRetrievedOnUpdateAttributes()
protected AttributeDefImpl[] getRetrievedOnInsertPrimaryKeys()
protected AttributeDefImpl[] getRetrievedOnUpdatePrimaryKeys()
protected AttributeDefImpl getChangeIndicatorColumn()
protected boolean isUpdateChangedColumns()
public java.lang.String getQuery()
protected void addPropertyChangeListener(int index, oracle.jbo.server.util.PropertyChangeListener listener)
PropertyChangeListener
to the listener list
for an attribute at the given index.
This method modifies the static/singleton metadata
index
- The index of the attribute to which the listener is to be addedlistener
- The PropertyChangeListener to be addedprotected void addPropertyChangeListener(java.lang.String attributeName, oracle.jbo.server.util.PropertyChangeListener listener)
PropertyChangeListener
to the listener list
for an attribute of the given Name
This method modifies the static/singleton metadata
attributeName
- The attribute to which the listener is to be addedlistener
- The PropertyChangeListener to be addedprotected void removePropertyChangeListener(int index, oracle.jbo.server.util.PropertyChangeListener listener)
PropertyChangeListener
from the listener list
of the given attribute (by index)
This method modifies the static/singleton metadata
listener
- The PropertyChangeListener to be removedprotected final void removePropertyChangeListener(java.lang.String attributeName, oracle.jbo.server.util.PropertyChangeListener listener)
PropertyChangeListener
from the listener list
of the given attribute (by index)
This method modifies the static/singleton metadata
attributeName
- The attribute to which the listener is to be addedlistener
- The PropertyChangeListener to be removedprotected void addVetoableChangeListener(oracle.jbo.server.util.VetoableChangeListener listener)
VetoableChangeListener
to the listener list.
This method modifies the static/singleton metadata
listener
- The VetoableChangeListener to be addedprotected void addVetoableChangeListener(int index, oracle.jbo.server.util.VetoableChangeListener listener)
VetoableChangeListener
to the listener list
for an attribute at the given index
This method modifies the static/singleton metadata
index
- The index of the attribute to which the listener is to be addedlistener
- The VetoableChangeListener to be addedprotected void addVetoableChangeListener(java.lang.String attributeName, oracle.jbo.server.util.VetoableChangeListener listener)
VetoableChangeListener
to the listener list
for an attribute of the given Name
This method modifies the static/singleton metadata
attributeName
- The attribute to which the listener is to be addedlistener
- The VetoableChangeListener to be addedprotected void removeVetoableChangeListener(oracle.jbo.server.util.VetoableChangeListener listener)
VetoableChangeListener
from the listener list.
This method modifies the static/singleton metadata
listener
- The VetoableChangeListener to be removedprotected void removeVetoableChangeListener(int index, oracle.jbo.server.util.VetoableChangeListener listener)
VetoableChangeListener
from the listener list
of the given attribute (by index)
This method modifies the static/singleton metadata
index
- The index of the attribute from which the listener is to be removedlistener
- The VetoableChangeListener to be removedprotected final void removeVetoableChangeListener(java.lang.String attributeName, oracle.jbo.server.util.VetoableChangeListener listener)
VetoableChangeListener
from the listener list
of the given attribute (by index)
This method modifies the static/singleton metadata
attributeName
- The attribute to which the listener is to be addedlistener
- The VetoableChangeListener to be removedpublic java.lang.String getAliasName()
public int getBindingStyle()
public void setBindingStyle(int bindingStyle)
protected boolean isRowIDPrimaryKey()
protected boolean isOIDInPrimaryKey()
protected void addUniquePKValidation()
Whenever any of the primary key attribute value changes, this validation rule is invoked to validate that the new key does not belong to any other entity of this type. If found, 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.
protected void loadCustomDef(oracle.jbo.server.xml.JboElementImpl xmlElement) throws PersistenceException
protected boolean hasLOBAttrs()
public static int getMaxAttrConst(java.lang.String entityName)
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |