public abstract class TransactionalResourceHelper extends Object
Constructor and Description |
---|
TransactionalResourceHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
decrementCount(Object resourceKey,
boolean allowNegative)
Decrement a count value for a named key
|
static int |
getCount(Object resourceKey)
Get the current count value for a named key
|
static <V> List<V> |
getList(Object resourceKey)
Support method to retrieve or create and bind a ArrayList to the current transaction.
|
static <K,V> Map<K,V> |
getMap(Object resourceKey)
Support method to retrieve or create and bind a HashMap to the current transaction.
|
static <V> Set<V> |
getSet(Object resourceKey)
Support method to retrieve or create and bind a HashSet to the current transaction.
|
static <V> TreeSet<V> |
getTreeSet(Object resourceKey)
Support method to retrieve or create and bind a TreeSet to the current transaction.
|
static int |
incrementCount(Object resourceKey)
Increment a count value for named key
|
static boolean |
isResourcePresent(Object resourceKey)
Support method to determine if there is already a resource associated with the
given key.
|
static void |
resetCount(Object resourceKey)
Reset the current count value for a named key.
|
public static final int getCount(Object resourceKey)
resourceKey
- the key to count againstpublic static final void resetCount(Object resourceKey)
resourceKey
- the key to count againstpublic static final int incrementCount(Object resourceKey)
resourceKey
- the key to count againstpublic static final int decrementCount(Object resourceKey, boolean allowNegative)
resourceKey
- the key to count againstallowNegative
- true to allow negative values otherwise zero will be the floorpublic static final boolean isResourcePresent(Object resourceKey)
resourceKey
- the key of the resource to checkpublic static final <K,V> Map<K,V> getMap(Object resourceKey)
K
- the map key typeV
- the map value typeresourceKey
- the key under which the resource will be storedpublic static final <V> Set<V> getSet(Object resourceKey)
V
- the set value typeresourceKey
- the key under which the resource will be storedpublic static final <V> TreeSet<V> getTreeSet(Object resourceKey)
V
- the set value typeresourceKey
- the key under which the resource will be storedpublic static final <V> List<V> getList(Object resourceKey)
V
- the list value typeresourceKey
- the key under which the resource will be storedCopyright © 2005–2017 Alfresco Software. All rights reserved.