SRJRCFrames
v0.1.296

de.schwarzrot.data.access
Class NullEntityManager

java.lang.Object
  extended by de.schwarzrot.data.access.support.AbstractEntityManager
      extended by de.schwarzrot.data.access.NullEntityManager
All Implemented Interfaces:
EntityManager

public class NullEntityManager
extends AbstractEntityManager

serves as a "remainder" for developers, that a certain entity is not handled the right way. Repository uses this "manager" as a fallback wich in turn throws an Exception for each call.

Author:
Reinhard Mantey

Field Summary
 
Fields inherited from class de.schwarzrot.data.access.support.AbstractEntityManager
appDefaults
 
Constructor Summary
NullEntityManager()
           
 
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
 EntityDescriptor getEntityDescriptor(Class<?> entityType, TransactionResource<?> res)
          accessor to description instances of entities.
 void releaseTransactionResource(TransactionResource<?> resource)
          free given storage handle
 void rollback(TransactionResource<?> handle)
          discards changes of given storage handle and marks Transaction as failed.
 
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

NullEntityManager

public NullEntityManager()
Method Detail

commit

public void commit(TransactionResource<?> resource)
Description copied from interface: EntityManager
used to persist all changes made during transaction.

Parameters:
resource - - an abstract handle to storage

createTransactionResource

public TransactionResource<?> createTransactionResource(Transaction t)
                                                 throws Exception
Description copied from interface: EntityManager
create an abstract handle to storage. TransactionResource is a wrapper to handle jdbc and preferences the same way.

Parameters:
t - - the transaction
Returns:
- a wrapped storage handle
Throws:
Exception - - depends on implementation

execute

public void execute(TransactionalOperation<?> tao)
             throws Exception
Description copied from interface: EntityManager
execute a single step of ApplicationTransaction

Parameters:
tao - - the transactional operation to execute
Throws:
Exception - - depends on implementation

getEntityDescriptor

public EntityDescriptor getEntityDescriptor(Class<?> entityType,
                                            TransactionResource<?> res)
Description copied from interface: EntityManager
accessor to description instances of entities. An EntityDescriptor holds all information needed by an EntityManager to handle instances of that entity. The EntityDescriptor may vary between different EntityManager s.

Parameters:
entityType - - the class of that entity
res - - the wrapped storage handle
Returns:
- the descriptor for that entity

releaseTransactionResource

public void releaseTransactionResource(TransactionResource<?> resource)
Description copied from interface: EntityManager
free given storage handle

Parameters:
resource - - a wrapped storage handle

rollback

public void rollback(TransactionResource<?> handle)
Description copied from interface: EntityManager
discards changes of given storage handle and marks Transaction as failed.

Parameters:
handle - - a wrapped storage handle

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.