de.fzj.unicore.wsrflite.persistence
Class PersistenceSettings

java.lang.Object
  extended by de.fzj.unicore.wsrflite.persistence.PersistenceSettings

public class PersistenceSettings
extends Object

Holds settings that govern the behaviour of the persistence system. These settings are per service class.
Usually instances of this class are created using PersistenceManager.getPersistenceSettings(Class) which will create (and cache) the settings

Author:
schuller

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
PersistenceSettings()
           
PersistenceSettings(boolean loadOnce, boolean allowConcurrentAccess, Map<String,Field> persistentFields)
           
 
Method Summary
static List<String> findConcurrentMethods(Class<?> spec)
           
static Map<String,Field> findPersistentFields(Class<?> spec)
           
static PersistenceSettings get(Class<?> spec)
          create persistence settings for the given service class, by evaluating annotations
 List<String> getConcurrentMethodNames()
           
static PersistenceSettings getDefaultSettings()
           
 Field getField(String key)
           
 Set<String> getPersistentFieldKeys()
           
 boolean isAllowedConcurrentAccess()
          returns true if the container should always allow concurrent access to instances
 boolean isConcurrentMethod(String methodName)
          returns true if access to the given method can be concurrent
 boolean isLoadOnce()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

PersistenceSettings

public PersistenceSettings()

PersistenceSettings

public PersistenceSettings(boolean loadOnce,
                           boolean allowConcurrentAccess,
                           Map<String,Field> persistentFields)
Method Detail

getPersistentFieldKeys

public Set<String> getPersistentFieldKeys()

getConcurrentMethodNames

public List<String> getConcurrentMethodNames()

get

public static PersistenceSettings get(Class<?> spec)
create persistence settings for the given service class, by evaluating annotations

Parameters:
spec -
Returns:
PersistenceSettings to be used for the service
Since:
1.8
See Also:
Persist, Persistent

isLoadOnce

public boolean isLoadOnce()

isAllowedConcurrentAccess

public boolean isAllowedConcurrentAccess()
returns true if the container should always allow concurrent access to instances

See Also:
Persistent

isConcurrentMethod

public boolean isConcurrentMethod(String methodName)
returns true if access to the given method can be concurrent

Parameters:
methodName -
See Also:
ConcurrentAccess

toString

public String toString()
Overrides:
toString in class Object

findPersistentFields

public static Map<String,Field> findPersistentFields(Class<?> spec)

findConcurrentMethods

public static List<String> findConcurrentMethods(Class<?> spec)

getField

public Field getField(String key)

getDefaultSettings

public static PersistenceSettings getDefaultSettings()


Copyright © 2010. All Rights Reserved.