wt.fc
Class PersistenceManagerEvent

java.lang.Object
  extended bywt.events.KeyedEvent
      extended bywt.fc.PersistenceManagerEvent

public class PersistenceManagerEvent
extends KeyedEvent

Used to represent events occuring within the PersistenceManager. This event supports both single and multiple object event targets. For most operations, the event target will either be a single Persistable or a WTCollection of Persistables.

The CLEANUP_LINK single object event contains the source Persistable object as the target and the cleaned up link is populated in the associatedLink attribute. The CLEANUP_LINK multiple object event contains a WTKeyedMap as the target. The key set in this map contains the source object and the associated values are the link objects. Note that the objects in the WTKeyedMap may not be inflated so they should be accesed as references when possible.

The COPY_LINK single object event contains the original Link object as the target and the new link is populated in the associatedLink attribute.The COPY_LINK multiple object event contains a WTKeyedMap as the target. The key set in this map contains the original link objects and the associated values are the new link objects. Note that the objects in this event's WTKeyedMap will be inflated.

Supported API: true

Extendable: false


Field Summary
private  Link associatedLink
           
private static String CLASSNAME
           
static String CLEANUP_LINK
          The event used to notify listeners that a link object has been removed as a result of deleting the target object of the event.
static String COPY_LINK
          The event used to notify listeners that a link object has been copied.
static String FULL_RESTORE
          Deprecated. as of 8.0, this event is no longer supported.
static String INFLATE_RESULT
          Deprecated. as of 8.0, this event is no longer supported.
static String INSERT
          The event used to notify listeners that an object has been inserted in the datastore.
private  Object[] operableObjectArray
           
static String POST_DELETE
          The event used to notify listeners that an object has been deleted.
static String POST_MODIFY
          The event used to notify listeners that an object has been modified.
static String POST_MULTI_DELETE
          Deprecated. as of R8.0, use POST_DELETE since multi-object events are supported directly
static String POST_REFRESH
          Deprecated. as of 8.0, this event is no longer supported.
static String POST_STORE
          The event used to notify listeners that a new object has been created.
static String PRE_DELETE
          The event used to notify listeners that an object is about to be deleted.
static String PRE_MODIFY
          The event used to notify listeners that an object is about to be modified.
static String PRE_MULTI_DELETE
          Deprecated. as of R8.0, use PRE_DELETE since multi-object events are supported directly
static String PRE_REMOVE
          The event used to notify listeners that an object is about to be deleted from the datastore.
static String PRE_STORE
          The event used to notify listeners that a new object is about to be created.
static String PREPARE_FOR_MODIFICATION
          The event used to notify listeners that an object is to be prepared for modification.
static String PREPARE_FOR_VIEW
          The event used to notify listeners that an object is to be prepared for view.
static String REMOVE
          The event used to notify listeners that an object has been deleted from the datastore.
private static String RESOURCE
           
private  Object resultContainer
           
static String UPDATE
          The event used to notify listeners that an object has been updated in the datastore.
 
Fields inherited from class wt.events.KeyedEvent
 
Constructor Summary
PersistenceManagerEvent(String eventType, Object target)
          This constructor initializes the instance.
PersistenceManagerEvent(String eventType, Object[] operableObjectArray)
          This constructor initializes the instance.
PersistenceManagerEvent(String eventType, Object target, Object resultContainer)
          This constructor initializes the instance.
PersistenceManagerEvent(String eventType, Persistable target, Link lnk)
          This constructor initializes the instance.
 
Method Summary
static String generateEventKey(String eventType)
          This method generates the event key.
 Link getAssociatedLink()
          Deprecated. as of R8.0, use getEventTarget() in a multi-object event listener.
 Vector getDisplayAttributes()
          Deprecated. as of R8.0, this type of event is no longer supported.
 Object[] getOperableObjectArray()
          Deprecated. as of R8.0, use getEventTarget() since multi-object events are supported directly.
 QueryResult getQueryResult()
          Deprecated. as of R8.0, this type of event is no longer supported.
 Object getResultContainer()
          Deprecated. as of R8.0, this type of event is no longer supported.
 Persistable getTarget()
          Deprecated. as of R8.0, use getEventTarget().
 KeyedEvent toMultiObjectEvent()
          This method generates a multiple object event for this instance.
 KeyedEvent[] toSingleObjectEvents()
          This method generates single object events for this instance.
 
Methods inherited from class wt.events.KeyedEvent
generateEventKey, generateEventKey, getConceptualClassname, getEventKey, getEventTarget, getEventType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

PRE_STORE

public static final String PRE_STORE
The event used to notify listeners that a new object is about to be created.

Supported API: true

See Also:
PersistenceManager.store(wt.fc.Persistable), PersistenceManager.store(wt.fc.collections.WTCollection), Constant Field Values

POST_STORE

public static final String POST_STORE
The event used to notify listeners that a new object has been created.

Supported API: true

See Also:
PersistenceManager.store(wt.fc.Persistable), PersistenceManager.store(wt.fc.collections.WTCollection), Constant Field Values

PRE_MODIFY

public static final String PRE_MODIFY
The event used to notify listeners that an object is about to be modified.

Supported API: true

See Also:
PersistenceManager.modify(wt.fc.Persistable), PersistenceManager.modify(wt.fc.collections.WTCollection), Constant Field Values

POST_MODIFY

public static final String POST_MODIFY
The event used to notify listeners that an object has been modified.

Supported API: true

See Also:
PersistenceManager.modify(wt.fc.Persistable), PersistenceManager.modify(wt.fc.collections.WTCollection), Constant Field Values

PREPARE_FOR_MODIFICATION

public static final String PREPARE_FOR_MODIFICATION
The event used to notify listeners that an object is to be prepared for modification.

Supported API: true

See Also:
PersistenceManager.prepareForModification(wt.fc.Persistable), PersistenceManager.prepareForModification(wt.fc.collections.WTCollection), Constant Field Values

PREPARE_FOR_VIEW

public static final String PREPARE_FOR_VIEW
The event used to notify listeners that an object is to be prepared for view.

Supported API: true

See Also:
PersistenceManager.prepareForView(wt.fc.Persistable), Constant Field Values

UPDATE

public static final String UPDATE
The event used to notify listeners that an object has been updated in the datastore.

Supported API: true

See Also:
PersistenceManagerSvr.update(wt.fc.Persistable), PersistenceManagerSvr.update(wt.fc.collections.WTCollection), Constant Field Values

PRE_REMOVE

public static final String PRE_REMOVE
The event used to notify listeners that an object is about to be deleted from the datastore. This event is emitted between PRE_DELETE and POST_DELETE and before a REMOVE.

Supported API: true

See Also:
PersistenceManager.delete(wt.fc.Persistable), PersistenceManager.delete(wt.fc.collections.WTSet), PersistenceManagerSvr.remove(wt.fc.Persistable), PersistenceManagerSvr.remove(wt.fc.collections.WTSet), Constant Field Values

REMOVE

public static final String REMOVE
The event used to notify listeners that an object has been deleted from the datastore. This event is emitted between PRE_DELETE and POST_DELETE and before a CLEANUP_LINK.

Supported API: true

See Also:
PersistenceManager.delete(wt.fc.Persistable), PersistenceManager.delete(wt.fc.collections.WTSet), PersistenceManagerSvr.remove(wt.fc.Persistable), PersistenceManagerSvr.remove(wt.fc.collections.WTSet), Constant Field Values

PRE_DELETE

public static final String PRE_DELETE
The event used to notify listeners that an object is about to be deleted.

Supported API: true

See Also:
PersistenceManager.delete(wt.fc.Persistable), PersistenceManager.delete(wt.fc.collections.WTSet), Constant Field Values

POST_DELETE

public static final String POST_DELETE
The event used to notify listeners that an object has been deleted.

Supported API: true

See Also:
PersistenceManager.delete(wt.fc.Persistable), PersistenceManager.delete(wt.fc.collections.WTSet), Constant Field Values

CLEANUP_LINK

public static final String CLEANUP_LINK
The event used to notify listeners that a link object has been removed as a result of deleting the target object of the event.

Supported API: false

See Also:
PersistenceManager.delete(wt.fc.Persistable), PersistenceManager.delete(wt.fc.collections.WTSet), PersistenceManagerSvr.remove(wt.fc.Persistable), PersistenceManagerSvr.remove(wt.fc.collections.WTSet), Constant Field Values

COPY_LINK

public static final String COPY_LINK
The event used to notify listeners that a link object has been copied.

Supported API: true

See Also:
PersistenceManagerSvr.copyLink(wt.fc.BinaryLink,wt.fc.Persistable,String,wt.fc.Persistable), PersistenceManagerSvr.copyLink(WTValuedHashMap), Constant Field Values

POST_REFRESH

public static final String POST_REFRESH
Deprecated. as of 8.0, this event is no longer supported.

The event used to notify listeners that an object has been refreshed.

Supported API: true

See Also:
Constant Field Values

FULL_RESTORE

public static final String FULL_RESTORE
Deprecated. as of 8.0, this event is no longer supported.

The event used to notify listeners that an object has been restored and that listeners should refresh ObjectReferences in the target object that they are responsible for.

Supported API: true

See Also:
Constant Field Values

INFLATE_RESULT

public static final String INFLATE_RESULT
Deprecated. as of 8.0, this event is no longer supported.

The event used to notify listeners that a query that might have ObjectReferences in it has been done.

Supported API: true

See Also:
Constant Field Values

associatedLink

private Link associatedLink

INSERT

public static final String INSERT
The event used to notify listeners that an object has been inserted in the datastore.

Supported API: true

See Also:
PersistenceManagerSvr.insert(wt.fc.Persistable), PersistenceManagerSvr.insert(wt.fc.collections.WTCollection), Constant Field Values

PRE_MULTI_DELETE

public static final String PRE_MULTI_DELETE
Deprecated. as of R8.0, use PRE_DELETE since multi-object events are supported directly

The event used to notify listeners that a multi object delete is about to begin.

Supported API: true

See Also:
Constant Field Values

POST_MULTI_DELETE

public static final String POST_MULTI_DELETE
Deprecated. as of R8.0, use POST_DELETE since multi-object events are supported directly

The event used to notify listeners that a multi object delete is complete.

Supported API: true

See Also:
Constant Field Values

operableObjectArray

private Object[] operableObjectArray

resultContainer

private Object resultContainer
Constructor Detail

PersistenceManagerEvent

public PersistenceManagerEvent(String eventType,
                               Object target)
This constructor initializes the instance.

Supported API: false

Parameters:
eventType -
target -

PersistenceManagerEvent

public PersistenceManagerEvent(String eventType,
                               Object target,
                               Object resultContainer)
This constructor initializes the instance.

Supported API: false

Parameters:
eventType -
target -
resultContainer -

PersistenceManagerEvent

public PersistenceManagerEvent(String eventType,
                               Persistable target,
                               Link lnk)
This constructor initializes the instance.

Supported API: false

Parameters:
eventType -
target -
lnk -

PersistenceManagerEvent

public PersistenceManagerEvent(String eventType,
                               Object[] operableObjectArray)
This constructor initializes the instance.

Supported API: false

Parameters:
eventType -
operableObjectArray -
Method Detail

getDisplayAttributes

public Vector getDisplayAttributes()
Deprecated. as of R8.0, this type of event is no longer supported.

Gets the value of the attribute: displayAttributes; The display attributes associated with the target object of a PersistenceManager operation.

Supported API: false

Returns:
Vector

getAssociatedLink

public Link getAssociatedLink()
Deprecated. as of R8.0, use getEventTarget() in a multi-object event listener.

Gets the value of the attribute: associatedLink; The link associated with the target object of a PersistenceManager operation.

Supported API: true

Returns:
Link

getResultContainer

public Object getResultContainer()
Deprecated. as of R8.0, this type of event is no longer supported.

Gets the value of the attribute: resultContainer; The result container associated with the target object of a PersistenceManager operation.

Supported API: false

Returns:
Object

generateEventKey

public static String generateEventKey(String eventType)
This method generates the event key.

Supported API: false

Parameters:
eventType -
Returns:
String

getTarget

public Persistable getTarget()
Deprecated. as of R8.0, use getEventTarget().

Return the target of this event.

Supported API: false

Returns:
the target of this event, may be null when queryResult is set.

getQueryResult

public QueryResult getQueryResult()
Deprecated. as of R8.0, this type of event is no longer supported.

Return the QueryResult associated with this event.

Supported API: false

Returns:
the target of this event, may be null.

getOperableObjectArray

public Object[] getOperableObjectArray()
Deprecated. as of R8.0, use getEventTarget() since multi-object events are supported directly.

Return the operableObjectArray associated to the multi delete event, may be null.

Supported API: true

Returns:
Object[]

toSingleObjectEvents

public KeyedEvent[] toSingleObjectEvents()
                                  throws WTException
This method generates single object events for this instance.

Supported API: false

Overrides:
toSingleObjectEvents in class KeyedEvent
Returns:
KeyedEvent[]
Throws:
WTException

toMultiObjectEvent

public KeyedEvent toMultiObjectEvent()
This method generates a multiple object event for this instance.

Supported API: false

Overrides:
toMultiObjectEvent in class KeyedEvent
Returns:
KeyedEvent