|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jbo.server.RowImpl oracle.jbo.server.EntityImpl oracle.jbo.server.ejb.facade.EntityFacadeImpl
Abstract base class for Entity Facade.
This class extends
.
Beyond the base EntityImpl
EntityImpl
functionality, this class
is responsible for interacting with the Local Entity Bean instance.
When the user builds an Entity Facade for an Entity Bean, a subclass of this class is generated.
Field Summary | |
protected EJBLocalObject |
mEJBLocalObject
|
Fields inherited from class oracle.jbo.server.EntityImpl |
DML_DELETE, DML_INSERT, DML_UPDATE, MAXATTRCONST, ORACLE_ROWID_COLUMN, XML_PK_CHANGED, XML_PK_CHANGED_YES |
Fields inherited from interface oracle.jbo.server.Entity |
STATUS_DEAD, STATUS_DELETED, STATUS_MODIFIED, STATUS_UNMODIFIED |
Fields inherited from interface oracle.jbo.Row |
REFRESH_CONTAINEES, REFRESH_FORGET_NEW_ROWS, REFRESH_REMOVE_NEW_ROWS, REFRESH_UNDO_CHANGES, REFRESH_WITH_DB_FORGET_CHANGES, REFRESH_WITH_DB_ONLY_IF_UNCHANGED, STATUS_INITIALIZED, STATUS_NEW |
Fields inherited from interface oracle.jbo.XMLInterface |
XML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT, XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE |
Constructor Summary | |
EntityFacadeImpl()
Constructs an Entity Facade. |
Method Summary | |
protected void |
doDML(int operation,
TransactionEvent e)
Overrides the base implementation of doDML(int, oracle.jbo.server.TransactionEvent) . |
protected void |
doSelect(boolean lock)
Overrides the base implementation of doSelect(boolean) . |
java.lang.Object |
getAttributeInternal(int index)
Overrides the base implementation of getAttributeInternal(int)
to make it public . |
protected EJBLocalObject |
getEJBLocalObject()
Returns the Local Entity Bean reference. |
boolean |
isAttributeUpdateable(int index)
Checks if the attribute is updateable. |
protected abstract void |
mergeBeanAttributes()
|
protected abstract void |
populateFromBean()
An abstract method responsible for populating Entity Facade attributes with the corresponding attribute values from the Entity Bean. |
void |
setAttribute(int index,
java.lang.Object val)
Sets the value of an attribute, given its index position. |
protected void |
setEJBLocalObject(EJBLocalObject ejbObject)
Sets the Local Entity Bean reference. |
abstract void |
updateBean(EJBLocalObject ejbObject)
An abstract method responsible for updating the Entity Bean with attribute values from this Entity Facade. |
Methods inherited from class oracle.jbo.server.RowImpl |
clearAllExceptions, clearAttributeException, clearRowExceptions, createXMLDefinition, findAttrAndGetIndex, getAllExceptions, getAttributeInternal, getRowExceptions, hasAttributeException, hasDeferredExceptions, printXMLDefinition, readXML, registerRowException, setAttributeInternal, writeXML, writeXML, writeXML, writeXML |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.jbo.XMLInterface |
readXML, writeXML, writeXML, writeXML, writeXML |
Field Detail |
protected EJBLocalObject mEJBLocalObject
Constructor Detail |
public EntityFacadeImpl()
Method Detail |
protected abstract void mergeBeanAttributes() throws java.lang.Exception
java.lang.Exception
protected EJBLocalObject getEJBLocalObject()
protected void setEJBLocalObject(EJBLocalObject ejbObject)
ejbObject
- the Local Entity Bean.public boolean isAttributeUpdateable(int index)
EntityImpl
READ_ONLY
, UPDATEABLE_WHILE_NEW
, or
UPDATEABLE
.
This method can be overridden. For example, override this method if you want to check the updateable status and you have dependencies between two or more attributes.
isAttributeUpdateable
in interface Row
isAttributeUpdateable
in class EntityImpl
index
- the attribute's index (0-based).
false
if the attribute is READ_ONLY
;
true
if attribute is UPDATEABLE
or if the
attribute is UPDATEABLE_WHILE_NEW
and the current row is new.public void setAttribute(int index, java.lang.Object val)
EntityImpl
If there is a set method for this attribute in a subclass of this Entity Object, that method is invoked. The set method name is derived from the attribute name: for example, the method getDeptNo() pertains to an attribute named "Deptno".
This method should not be overridden; override
setAttributeInternal
instead.
setAttribute
in interface AttributeList
setAttribute
in class EntityImpl
index
- the index of the attribute.val
- the value to be assigned to the attribute. The class of the returned
value a Java type determined by this Entity Object's definition
object.protected void doSelect(boolean lock)
doSelect(boolean)
.
It populates Entity Facade attributes with the corresponding
attribute values from the Entity Bean by calling the abstract
method populateFromBean()
.
doSelect
in class EntityImpl
lock
- a flag indicating whether the Entity Facade
is being 'selected' for update (with a lock)
or not. This flag is currently unsed by
EntityFacadeImpl
.protected abstract void populateFromBean() throws java.lang.Exception
A subclass of this class has an implementation of this method which performs this operation specific to that subclass.
java.lang.Exception
- if something goes wrong while retrieving
attribute values from the Entity Bean or
while setting attibute values into this
Entity Facade. Note that it may throw an
EJB exception.public abstract void updateBean(EJBLocalObject ejbObject) throws java.lang.Exception
A subclass of this class has an implementation of this method which performs this operation specific to that subclass.
ejbObject
- the Local Entity Bean.
java.lang.Exception
- if something goes wrong while retrieving
attribute values from this Entity Facade or
while setting attibute values into the
Entity Bean. Note that it may throw an
EJB exception.protected void doDML(int operation, TransactionEvent e)
doDML(int, oracle.jbo.server.TransactionEvent)
.
It performs data update operation, syncing the Entity Facade with the corresponding Local Entity Bean instance. If this Entity Facade is a new one, it will create a new Local Entity Bean instance. If this Facade was removed (deleted), it will remove the Entity Bean instance. If this Facade was updated, it will update the Entity Bean with the new attribute values.
doDML
in class EntityImpl
operation
- identifies the data update operation to perform.e
- describes the transaction event.public java.lang.Object getAttributeInternal(int index)
getAttributeInternal(int)
to make it public
.
getAttributeInternal
in class EntityImpl
index
- the attribute index.
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.