|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 2 (11.1.2.0.0) E17483-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EntityListener
Implemented by classes that receive events generated by operations on Entity Object rows.
When an Entity Object's row data changes, listeners to row events are notified
through a call to sourceChanged()
. Listener's may be subscribed by
calling addEntityListener()
.
createRow()
on a View Object, rows are created for the
Entity Object. After the rows are initialized,
a STATE_CHANGE
event is sent to listeners
with a new post state of STATUS_NEW
.
As the user sets attributes on this row, ATTRIBUTE_CHANGE
events are sent.
After the new row is successfully posted to database,
a STATE_CHANGE
event is sent to
listeners with a new post state of
STATUS_UNMODIFIED
. That is, after posting,
the new row becomes an unmodified old row.
For an existing row, no Entity Object event is sent when the row is
brought into the cache. However, when the user causes the row to be
locked, an ATTRIBUTE_CHANGE
event is sent with the attribute values present in the cache before
locking. Locking may refresh rows, replacing their data with
new data from the database.
After the row is locked, the first call to setAttribute()
will
generate a STATE_CHANGE
event with the new
post state STATUS_MODIFIED
.
Subsequent calls to lock()
and setAttribute()
will generate
ATTRIBUTE_CHANGE
events. Note that if
setAttribute()
is called without first calling lock()
,
lock()
will be called implicitly, and will generate an event of its own.
These events may be distinguished by the fact that the
Entity Object's post state when lock()
generates its event
is STATUS_UNMODIFIED
, but is STATUS_MODIFIED
for the event generated by setAttribute()
.
As in the case of a new row, after the modified row is
successfully posted to database, a STATE_CHANGE
event is
generated with a new post state of STATUS_UNMODIFIED
.
When a row is removed the row it is first locked, if it is not locked
already, generating an ATTRIBUTE_CHANGE
event as described above. Second, a BEFORE_REMOVE
event is sent. Third, the row
is marked as removed and a STATE_CHANGE
event is sent
with a new post status of STATUS_DELETED
.
Finally, another STATE_CHANGE
event is sent with a new post status of STATUS_DEAD
.
EntityListener
,
EntityEvent
,
EntityImpl
,
Entity
Method Summary | |
---|---|
void |
sourceChanged(EntityEvent event)
Event handler called by an event publisher to report that an Entity Object's row data has changed. |
Method Detail |
---|
void sourceChanged(EntityEvent event)
event
- the event describing the change.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 2 (11.1.2.0.0) E17483-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |