|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.schwarzrot.data.access.support.AbstractEntityManager de.schwarzrot.data.access.pref.PreferencesEntityManager
public class PreferencesEntityManager
a manager to handle configuration entities. Those entities are stored as preferences and may consist of a user and a system part. On reading, system parts are used as fallback and are considered readonly on normal application run.
Writing of user or system part depends on the jvm permissions. Configuration entities are considered being singletons, so any given condition arguments are ignored and all variants of find() or get() return the same instance.
AbstractConfigBase
Field Summary |
---|
Fields inherited from class de.schwarzrot.data.access.support.AbstractEntityManager |
---|
appDefaults |
Constructor Summary | |
---|---|
PreferencesEntityManager()
|
Method Summary | ||
---|---|---|
void |
commit(TransactionResource<?> resource)
used to persist all changes made during transaction. |
|
TransactionResource<?> |
createTransactionResource(Transaction t)
create an abstract handle to storage. |
|
void |
execute(TransactionalOperation<?> tao)
execute a single step of ApplicationTransaction |
|
protected
|
fillEntity(E entity,
EntityDescriptor ed,
DataAccessor da)
|
|
EntityDescriptor |
getEntityDescriptor(Class<?> entityType,
TransactionResource<?> res)
accessor to description instances of entities. |
|
protected static Map<String,Integer> |
getSkipList()
|
|
protected
|
readForeigns(E any,
EntityDescriptor ed,
PreferencesManager pm)
|
|
protected
|
readNamedChildren(E any,
EntityDescriptor ed,
PreferencesManager pm)
|
|
protected
|
readRelated(E any,
EntityDescriptor ed,
PreferencesManager pm)
|
|
protected
|
readUnnamedChildren(E any,
EntityDescriptor ed)
|
|
void |
releaseTransactionResource(TransactionResource<?> resource)
free given storage handle |
|
void |
rollback(TransactionResource<?> resource)
discards changes of given storage handle and marks Transaction as
failed. |
|
protected
|
saveConfig(PreferencesManager pm,
E any,
EntityDescriptor ed,
boolean writeSystemConfig)
|
|
protected
|
saveForeigns(PreferencesManager pm,
E any,
EntityDescriptor ed,
boolean writeSystemConfig)
|
|
protected
|
saveMap(PreferencesManager pm,
E any,
String name,
Map<?,?> children,
EntityDescriptor ed,
boolean writeSystemConfig)
|
|
protected
|
saveNamedChildren(PreferencesManager pm,
E any,
EntityDescriptor ed,
boolean writeSystemConfig)
|
|
protected
|
saveProperties(PreferencesManager pm,
E instance,
String nodePath,
EntityDescriptor ed,
Collection<String> propertyNames,
boolean writeSystemConfig)
|
|
protected
|
saveUnnamedChildren(PreferencesManager pm,
E any,
EntityDescriptor ed,
boolean writeSystemConfig)
|
Methods inherited from class de.schwarzrot.data.access.support.AbstractEntityManager |
---|
dumpTypeCache, getApplicationDefaults, getApplicationName, getEntityCache, getEntityIntrospector, getEntityUtils, getName, getSchemaName, getSchemaName, getUserNameProvider, loadClass, needsTransaction, setEntityCache, setEntityIntrospector, setEntityUtils, setSchemaName, setSchemaName, setUserNameProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PreferencesEntityManager()
Method Detail |
---|
public void commit(TransactionResource<?> resource) throws Exception
EntityManager
resource
- - an abstract handle to storage
Exception
- - depends on implementationpublic TransactionResource<?> createTransactionResource(Transaction t) throws Exception
EntityManager
TransactionResource
is a
wrapper to handle jdbc and preferences the same way.
t
- - the transaction
Exception
- - depends on implementationpublic void execute(TransactionalOperation<?> tao) throws Exception
EntityManager
ApplicationTransaction
tao
- - the transactional operation to execute
Exception
- - depends on implementationpublic final EntityDescriptor getEntityDescriptor(Class<?> entityType, TransactionResource<?> res)
EntityManager
EntityDescriptor
holds all information needed by an
EntityManager
to handle instances of that entity. The
EntityDescriptor
may vary between different EntityManager
s.
entityType
- - the class of that entityres
- - the wrapped storage handle
public void releaseTransactionResource(TransactionResource<?> resource)
EntityManager
resource
- - a wrapped storage handlepublic void rollback(TransactionResource<?> resource)
EntityManager
Transaction
as
failed.
resource
- - a wrapped storage handleprotected <E extends Entity> void fillEntity(E entity, EntityDescriptor ed, DataAccessor da)
protected <E extends Entity> void readForeigns(E any, EntityDescriptor ed, PreferencesManager pm)
protected <E extends Entity> void readNamedChildren(E any, EntityDescriptor ed, PreferencesManager pm)
protected <E extends Entity> void readRelated(E any, EntityDescriptor ed, PreferencesManager pm)
protected <E extends Entity> void readUnnamedChildren(E any, EntityDescriptor ed)
protected <E extends Entity> int saveConfig(PreferencesManager pm, E any, EntityDescriptor ed, boolean writeSystemConfig)
protected <E extends Entity> int saveForeigns(PreferencesManager pm, E any, EntityDescriptor ed, boolean writeSystemConfig)
protected <E extends Entity> int saveMap(PreferencesManager pm, E any, String name, Map<?,?> children, EntityDescriptor ed, boolean writeSystemConfig)
protected <E extends Entity> int saveNamedChildren(PreferencesManager pm, E any, EntityDescriptor ed, boolean writeSystemConfig)
protected <E extends Entity> int saveProperties(PreferencesManager pm, E instance, String nodePath, EntityDescriptor ed, Collection<String> propertyNames, boolean writeSystemConfig)
protected <E extends Entity> int saveUnnamedChildren(PreferencesManager pm, E any, EntityDescriptor ed, boolean writeSystemConfig)
protected static Map<String,Integer> getSkipList()
|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |