The following methods can be used by event listeners (and other classes) in the same package to add entities to an EventCache and indicate if the operation is being performed on the entity:
EventCache#put(Object entity, Object copy, boolean isOperatedOn)
The following method can be used by event listeners (and other classes) in the same package to indicate that the operation is being performed on an entity already in the EventCache: {@link EventCache#setOperatedOn(Object entity, boolean isOperatedOn)
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if this EventCache contains a mapping for the specified entitymust be non-null entity)Implements java. |
| public boolean | Returns: true if this EventCache maps one or more entities to the specified copymust be non-null copy)Implements java. |
| public Set | Returns: set view of the entity-to-copy mappings contained in this EventCacheImplements java. |
| public Object | Returns: the copy to which this EventCache maps the specified entitymust be non-null entity)Implements java. |
| public Map | |
| public boolean | Returns: true if this EventCache contains no entity-copy mappingsImplements java. |
| public boolean | Returns: true if the listener is performing the operation on the specified entity.must be non-null entity)Returns true if the listener is performing the operation on the specified entity. |
| public Set | Returns: a set view of the entities contained in this EventCacheImplements java. |
| public Object | Returns: previous copy associated with specified entity, or null if there was no mapping for entity.must be non-null entity, Object must be non- null copy)Implements java. |
| pack-priv Object | Returns: previous copy associated with specified entity, or null if there was no mapping for entity.must be non-null entity, Object must be non- null copy, boolean indicates if the operation is performed on the entity isOperatedOn)Associates the specified entity with the specified copy in this EventCache; |
| public void | putAll(Map<K, V>
keys and values must be non-null map)Implements java. |
| public Object | Returns: previous value associated with specified entity, or null if there was no mapping for entity.must be non-null entity)Implements java. |
| pack-priv void | Returns: true if the listener is performing the operation on the specified entitymust be non-null and this EventCache must contain a mapping for this entity entity, boolean isOperatedOn)Set flag to indicate if the listener is performing the operation on the specified entity. |
| public int | Returns: the number of entity-copy mappings in this EventCacheImplements java. |
| public Collection | Returns: a collection view of the entity copies contained in this EventCacheImplements java. |
| entityToCopyMap | back to summary |
|---|---|
| private Map<K, V> entityToCopyMap | |
| entityToOperatedOnFlagMap | back to summary |
|---|---|
| private Map<K, V> entityToOperatedOnFlagMap | |
| EventCache | back to summary |
|---|---|
| pack-priv EventCache() | |
| clear | back to summary |
|---|---|
| public void clear() Implements java. Clears the EventCache. | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object entity) Implements java. Returns true if this EventCache contains a mapping for the specified entity.
| |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object copy) Implements java. Returns true if this EventCache maps one or more entities to the specified copy.
| |
| entrySet | back to summary |
|---|---|
| public Set Implements java. Returns a set view of the entity-to-copy mappings contained in this EventCache.
| |
| get | back to summary |
|---|---|
| public Object get(Object entity) Implements java. Returns the copy to which this EventCache maps the specified entity.
| |
| invertMap | back to summary |
|---|---|
| public Map Returns the copy-entity mappings
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Returns true if this EventCache contains no entity-copy mappings.
| |
| isOperatedOn | back to summary |
|---|---|
| public boolean isOperatedOn(Object entity) Returns true if the listener is performing the operation on the specified entity.
| |
| keySet | back to summary |
|---|---|
| public Set Implements java. Returns a set view of the entities contained in this EventCache
| |
| put | back to summary |
|---|---|
| public Object put(Object entity, Object copy) Implements java. Associates the specified entity with the specified copy in this EventCache;
| |
| put | back to summary |
|---|---|
| pack-priv Object put(Object entity, Object copy, boolean isOperatedOn) Associates the specified entity with the specified copy in this EventCache;
| |
| putAll | back to summary |
|---|---|
| public void putAll(Map<K, V> map) Implements java. Copies all of the mappings from the specified map to this EventCache
| |
| remove | back to summary |
|---|---|
| public Object remove(Object entity) Implements java. Removes the mapping for this entity from this EventCache if it is present
| |
| setOperatedOn | back to summary |
|---|---|
| pack-priv void setOperatedOn(Object entity, boolean isOperatedOn) Set flag to indicate if the listener is performing the operation on the specified entity.
| |
| size | back to summary |
|---|---|
| public int size() Implements java. Returns the number of entity-copy mappings in this EventCache
| |
| values | back to summary |
|---|---|
| public Collection Implements java. Returns a collection view of the entity copies contained in this EventCache.
| |