SRJRCFrames
v0.1.296

de.schwarzrot.data.access.support
Class AbstractEntityManager

java.lang.Object
  extended by de.schwarzrot.data.access.support.AbstractEntityManager
All Implemented Interfaces:
EntityManager
Direct Known Subclasses:
JDBCEntityManager, NullEntityManager, PreferencesEntityManager

public abstract class AbstractEntityManager
extends Object
implements EntityManager

abstract helper class for conveniance of creation of EntityManagers.

Author:
Reinhard Mantey

Field Summary
protected  SystemDefault appDefaults
           
 
Constructor Summary
AbstractEntityManager()
           
 
Method Summary
 void dumpTypeCache()
          for debugging purpose only.
protected  SystemDefault getApplicationDefaults()
           
 String getApplicationName()
          returns the name of the application
 EntityHolder getEntityCache()
           
 EntityIntrospector getEntityIntrospector()
           
 EntityUtils getEntityUtils()
           
 String getName()
           
 String getSchemaName()
           
 String getSchemaName(Class<?> entityType, TransactionResource<?> resource)
          returns the schema name, used by entities of given type and given storage
 UserNameProvider getUserNameProvider()
           
protected  Class<?> loadClass(String className)
           
 boolean needsTransaction()
           
 void setEntityCache(EntityHolder eh)
          sets the cache for entity instances
 void setEntityIntrospector(EntityIntrospector entityIntrospector)
          sets the entity introspector used to fill an EntityDescriptor with informations about entities.
 void setEntityUtils(EntityUtils entityUtils)
           
 void setSchemaName(Class<?> entityType, String schemaName, TransactionResource<?> resource)
          sets the schema name to use by instances of given entity and resource
 void setSchemaName(String schemaName)
           
 void setUserNameProvider(UserNameProvider userNameProvider)
          sets the username provider used by this EntityManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.schwarzrot.data.access.EntityManager
commit, createTransactionResource, execute, getEntityDescriptor, releaseTransactionResource, rollback
 

Field Detail

appDefaults

protected SystemDefault appDefaults
Constructor Detail

AbstractEntityManager

public AbstractEntityManager()
Method Detail

dumpTypeCache

public void dumpTypeCache()
Description copied from interface: EntityManager
for debugging purpose only. Dumps out all known entities of that EntityManager.

Specified by:
dumpTypeCache in interface EntityManager

getApplicationName

public final String getApplicationName()
Description copied from interface: EntityManager
returns the name of the application

Specified by:
getApplicationName in interface EntityManager
Returns:
- the name of the application

getEntityCache

public final EntityHolder getEntityCache()

getEntityIntrospector

public final EntityIntrospector getEntityIntrospector()

getEntityUtils

public final EntityUtils getEntityUtils()

getName

public final String getName()

getSchemaName

public final String getSchemaName()
Returns:
the schemaName

getSchemaName

public final String getSchemaName(Class<?> entityType,
                                  TransactionResource<?> resource)
Description copied from interface: EntityManager
returns the schema name, used by entities of given type and given storage

Specified by:
getSchemaName in interface EntityManager
Parameters:
entityType - - the class of entity
resource - - the wrapped storage handle
Returns:
- the schema name to use

getUserNameProvider

public final UserNameProvider getUserNameProvider()

needsTransaction

public boolean needsTransaction()

setEntityCache

public final void setEntityCache(EntityHolder eh)
Description copied from interface: EntityManager
sets the cache for entity instances

Specified by:
setEntityCache in interface EntityManager
Parameters:
eh - - the cache handler

setEntityIntrospector

public final void setEntityIntrospector(EntityIntrospector entityIntrospector)
Description copied from interface: EntityManager
sets the entity introspector used to fill an EntityDescriptor with informations about entities.

Specified by:
setEntityIntrospector in interface EntityManager
Parameters:
entityIntrospector - - the introspector to use

setEntityUtils

public final void setEntityUtils(EntityUtils entityUtils)

setSchemaName

public final void setSchemaName(Class<?> entityType,
                                String schemaName,
                                TransactionResource<?> resource)
Description copied from interface: EntityManager
sets the schema name to use by instances of given entity and resource

Specified by:
setSchemaName in interface EntityManager
Parameters:
entityType - - class of entity
schemaName - - the schema name
resource - - a wrapped storage handle

setSchemaName

public final void setSchemaName(String schemaName)
Parameters:
schemaName - the schemaName to set

setUserNameProvider

public final void setUserNameProvider(UserNameProvider userNameProvider)
Description copied from interface: EntityManager
sets the username provider used by this EntityManager

Specified by:
setUserNameProvider in interface EntityManager
Parameters:
userNameProvider - - the username provider to use

getApplicationDefaults

protected SystemDefault getApplicationDefaults()

loadClass

protected final Class<?> loadClass(String className)
                            throws ClassNotFoundException
Throws:
ClassNotFoundException

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.