org.alfresco.repo.transaction
Class TransactionalResourceHelper

java.lang.Object
  extended by org.alfresco.repo.transaction.TransactionalResourceHelper

public abstract class TransactionalResourceHelper
extends java.lang.Object

Helper class that will look up or create transactional resources. This shortcuts some of the "if not existing, then create" code.

Since:
3.2

Constructor Summary
TransactionalResourceHelper()
           
 
Method Summary
static java.util.List getList(java.lang.Object resourceKey)
          Support method to retrieve or create and bind a ArrayList to the current transaction.
static java.util.Map getMap(java.lang.Object resourceKey)
          Support method to retrieve or create and bind a HashMap to the current transaction.
static java.util.Set getSet(java.lang.Object resourceKey)
          Support method to retrieve or create and bind a HashSet to the current transaction.
static java.util.TreeSet getTreeSet(java.lang.Object resourceKey)
          Support method to retrieve or create and bind a TreeSet to the current transaction.
static void resetBoolean(java.lang.Object resourceKey)
          Support method to reset (make false) a boolean value in the current transaction.
static boolean setBoolean(java.lang.Object resourceKey)
          Support method to set a boolean (true) value in the current transaction.
static boolean testBoolean(java.lang.Object resourceKey)
          Is there a boolean value in the current transaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionalResourceHelper

public TransactionalResourceHelper()
Method Detail

getMap

public static final java.util.Map getMap(java.lang.Object resourceKey)
Support method to retrieve or create and bind a HashMap to the current transaction.

Parameters:
resourceKey - the key under which the resource will be stored
Returns:
Returns an previously-bound Map or else a newly-bound HashMap

getSet

public static final java.util.Set getSet(java.lang.Object resourceKey)
Support method to retrieve or create and bind a HashSet to the current transaction.

Parameters:
resourceKey - the key under which the resource will be stored
Returns:
Returns an previously-bound Set or else a newly-bound HashSet

getTreeSet

public static final java.util.TreeSet getTreeSet(java.lang.Object resourceKey)
Support method to retrieve or create and bind a TreeSet to the current transaction.

Parameters:
resourceKey - the key under which the resource will be stored
Returns:
Returns an previously-bound TreeSet or else a newly-bound TreeSet

getList

public static final java.util.List getList(java.lang.Object resourceKey)
Support method to retrieve or create and bind a ArrayList to the current transaction.

Parameters:
resourceKey - the key under which the resource will be stored
Returns:
Returns an previously-bound List or else a newly-bound ArrayList

setBoolean

public static final boolean setBoolean(java.lang.Object resourceKey)
Support method to set a boolean (true) value in the current transaction.

Parameters:
resourceKey - the key under which the resource will be stored
Returns:
true - the value of resourceKey, was set to true, false - the value was already true

resetBoolean

public static final void resetBoolean(java.lang.Object resourceKey)
Support method to reset (make false) a boolean value in the current transaction.

Parameters:
resourceKey - the key under which the resource is stored.

testBoolean

public static final boolean testBoolean(java.lang.Object resourceKey)
Is there a boolean value in the current transaction

Parameters:
resourceKey - the key under which the resource will be stored
Returns:
true - thre is, false no.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.