Purpose: Encapsulate the information provided with descriptor events. This is used as the argument to any event raised by the descriptor. Events can be registered for through two methods, the first is by providing a method to be called on the object that a particular operation is being performed on. The second is by registering a manager object to be notified when any event occurs for that descriptor. The second method is more similar to the java beans event model but requires the registered object to implement the DescriptorEventListener interface.
DescriptorEventManager, DescriptorEventListener
| Modifier and Type | Field and Description |
|---|---|
| protected ObjectChangeSet | changeSet
For the post merge event it is possible that there has been a change set generated. |
| protected DataRecord | dataRecord
Optionally a database row may be provided on some events, (such as aboutToUpdate). |
| protected ClassDescriptor | |
| protected int | eventCode
The code of the descriptor event being raised. |
| protected static String[] | eventNames
Event names for toString() |
| protected Object | originalObject
The source object represents the object the event is being raised on, some events also require a second object, for example the original object in a postClone. |
| protected DatabaseQuery | query
The query causing the event. |
| protected AbstractSession | session
The session in which the event is raised. |
| Access | Constructor and Description |
|---|---|
| public | DescriptorEvent(int eventCode, ObjectLevelModifyQuery query)
PUBLIC: Most events are trigger from queries, so this is a helper method. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | applyAttributeValuesIntoRow(String attributeName)
PUBLIC: Re-populate the database row with the values from the source object based upon the attribute's mapping. |
| public ObjectChangeSet | |
| public ClassDescriptor | |
| public ClassDescriptor | |
| public int | |
| public Object | |
| public Object | getOriginalObject()
PUBLIC: The source object represents the object the event is being raised on, some events also require a second object, for example the original object in a postClone. |
| public DatabaseQuery | |
| public DataRecord | getRecord()
PUBLIC: Return the record that is associated with some events, such as postBuild, and aboutToUpdate. |
| public AbstractSession | |
| public void | setChangeSet(ObjectChangeSet newChangeSet)
INTERNAL: Sets the Change set in the event if the change Set is available |
| public void | |
| public void | |
| public void | setOriginalObject(Object originalObject)
INTERNAL: The source object represents the object the event is being raised on, some events also require a second object, for example the original object in a postClone. |
| public void | |
| public void | setRecord(DataRecord dataRecord)
INTERNAL: Optionally a database row may be provided on some events, (such as aboutToUpdate). |
| public void | |
| public String | |
| public void | updateAttributeAddObjectToCollection(String attributeName, Object mapKey, Object value)
ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. |
| public void | updateAttributeRemoveObjectFromCollection(String attributeName, Object mapKey, Object value)
ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. |
| public void | updateAttributeWithObject(String attributeName, Object value)
ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. |
| changeSet | back to summary |
|---|---|
| protected ObjectChangeSet changeSet For the post merge event it is possible that there has been a change set generated. This attribute will store the changeSet for the object just merged | |
| dataRecord | back to summary |
|---|---|
| protected DataRecord dataRecord Optionally a database row may be provided on some events, (such as aboutToUpdate). | |
| descriptor | back to summary |
|---|---|
| protected ClassDescriptor descriptor | |
| eventCode | back to summary |
|---|---|
| protected int eventCode The code of the descriptor event being raised. This is an integer constant value from DescriptorEventManager. | |
| eventNames | back to summary |
|---|---|
| protected static String[] eventNames Event names for toString() | |
| originalObject | back to summary |
|---|---|
| protected Object originalObject The source object represents the object the event is being raised on, some events also require a second object, for example the original object in a postClone. | |
| query | back to summary |
|---|---|
| protected DatabaseQuery query The query causing the event. | |
| session | back to summary |
|---|---|
| protected AbstractSession session The session in which the event is raised. | |
| DescriptorEvent | back to summary |
|---|---|
| public DescriptorEvent(int eventCode, ObjectLevelModifyQuery query) PUBLIC: Most events are trigger from queries, so this is a helper method. | |
| DescriptorEvent | back to summary |
|---|---|
| public DescriptorEvent(Object sourceObject) PUBLIC: All events require a source object. | |
| applyAttributeValuesIntoRow | back to summary |
|---|---|
| public void applyAttributeValuesIntoRow(String attributeName) PUBLIC: Re-populate the database row with the values from the source object based upon the attribute's mapping. Provided as a helper method for modifying the row during event handling. | |
| getChangeSet | back to summary |
|---|---|
| public ObjectChangeSet getChangeSet() PUBLIC: Returns the Object changeSet if available | |
| getClassDescriptor | back to summary |
|---|---|
| public ClassDescriptor getClassDescriptor() PUBLIC: The source descriptor of the event. | |
| getDescriptor | back to summary |
|---|---|
| public ClassDescriptor getDescriptor() PUBLIC: The source descriptor of the event. | |
| getEventCode | back to summary |
|---|---|
| public int getEventCode() PUBLIC: The code of the descriptor event being raised. This is an integer constant value from DescriptorEventManager. | |
| getObject | back to summary |
|---|---|
| public Object getObject() PUBLIC: Synanym for source. | |
| getOriginalObject | back to summary |
|---|---|
| public Object getOriginalObject() PUBLIC: The source object represents the object the event is being raised on, some events also require a second object, for example the original object in a postClone.
| |
| getQuery | back to summary |
|---|---|
| public DatabaseQuery getQuery() PUBLIC: The query causing the event. | |
| getRecord | back to summary |
|---|---|
| public DataRecord getRecord() PUBLIC: Return the record that is associated with some events, such as postBuild, and aboutToUpdate. | |
| getSession | back to summary |
|---|---|
| public AbstractSession getSession() PUBLIC: The session in which the event is raised. | |
| setChangeSet | back to summary |
|---|---|
| public void setChangeSet(ObjectChangeSet newChangeSet) INTERNAL: Sets the Change set in the event if the change Set is available | |
| setDescriptor | back to summary |
|---|---|
| public void setDescriptor(ClassDescriptor descriptor) INTERNAL: The source descriptor of the event. | |
| setEventCode | back to summary |
|---|---|
| public void setEventCode(int eventCode) INTERNAL: The code of the descriptor event being raised. This is an integer constant value from DescriptorEventManager. | |
| setOriginalObject | back to summary |
|---|---|
| public void setOriginalObject(Object originalObject) INTERNAL: The source object represents the object the event is being raised on, some events also require a second object, for example the original object in a postClone. | |
| setQuery | back to summary |
|---|---|
| public void setQuery(DatabaseQuery query) INTERNAL: The query causing the event. | |
| setRecord | back to summary |
|---|---|
| public void setRecord(DataRecord dataRecord) INTERNAL: Optionally a database row may be provided on some events, (such as aboutToUpdate). | |
| setSession | back to summary |
|---|---|
| public void setSession(AbstractSession session) INTERNAL: The session in which the event is raised. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. INTERNAL:
| |
| updateAttributeAddObjectToCollection | back to summary |
|---|---|
| public void updateAttributeAddObjectToCollection(String attributeName, Object mapKey, Object value) ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. in events to ensure that all required objects are updated. EclipseLink will automatically update all objects and changesets involved. EclipseLink will update the field, in the row, to have the new value for the field that this mapping maps to. If the attribute being updated is within an aggregate then pass the updated aggregate and the attribute of the aggregate mapping into this method. | |
| updateAttributeRemoveObjectFromCollection | back to summary |
|---|---|
| public void updateAttributeRemoveObjectFromCollection(String attributeName, Object mapKey, Object value) ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. in events to ensure that all required objects are updated. EclipseLink will automatically update all objects and changesets involved. EclipseLink will update the field, in the row, to have the new value for the field that this mapping maps to. | |
| updateAttributeWithObject | back to summary |
|---|---|
| public void updateAttributeWithObject(String attributeName, Object value) ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. in events to ensure that all required objects are updated. EclipseLink will automatically update all objects and changesets involved. EclipseLink will update the field, in the row, to have the new value for the field that this mapping maps to. | |