org.apache.ojb.otm.kit
Class SimpleKit

java.lang.Object
  extended by org.apache.ojb.otm.OTMKit
      extended by org.apache.ojb.otm.kit.SimpleKit
All Implemented Interfaces:
Kit

public class SimpleKit
extends OTMKit

A base implementation of an OTMKit using local transactions, an in-memory lock map, and metadata based object copying for object swizzling in transactional contexts.

Author:
Raghu Rajah

Field Summary
protected  ObjectCopyStrategy _cloneableCopyStrategy
           
protected  ObjectCopyStrategy _defaultCopyStrategy
           
private static SimpleKit _instance
           
protected  LockMap _lockMap
           
protected  LockWaitStrategy _lockWaitStrategy
           
protected  ObjectCopyStrategy _noOpCopyStrategy
           
protected  Swizzling _swizzlingStrategy
           
protected  TransactionFactory _txFactory
           
 
Constructor Summary
protected SimpleKit()
          Constructor for SimpleKit.
 
Method Summary
 ObjectCopyStrategy getCopyStrategy(Identity oid)
           
static SimpleKit getInstance()
          Obtain the single instance of SimpleKit
 LockMap getLockMap()
           
 LockWaitStrategy getLockWaitStrategy()
           
 Swizzling getSwizzlingStrategy()
           
protected  TransactionFactory getTransactionFactory()
           
 boolean isEagerInsert(Object obj)
          Should OTM perform INSERTs for the given object eagerly or during commit?
 boolean isImplicitLockingUsed()
          Should OTM implicitely lock all objects that are reachable from the explicitely locked object? The updates to the locked objects are automatically stored to the database at the end of transaction.
 boolean isInsertVerified()
          Should OTM verify each inserted object for presence in the database?
 
Methods inherited from class org.apache.ojb.otm.OTMKit
acquireConnection, getTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_instance

private static SimpleKit _instance

_txFactory

protected TransactionFactory _txFactory

_swizzlingStrategy

protected Swizzling _swizzlingStrategy

_lockWaitStrategy

protected LockWaitStrategy _lockWaitStrategy

_lockMap

protected LockMap _lockMap

_noOpCopyStrategy

protected ObjectCopyStrategy _noOpCopyStrategy

_defaultCopyStrategy

protected ObjectCopyStrategy _defaultCopyStrategy

_cloneableCopyStrategy

protected ObjectCopyStrategy _cloneableCopyStrategy
Constructor Detail

SimpleKit

protected SimpleKit()
Constructor for SimpleKit.

Method Detail

getInstance

public static SimpleKit getInstance()
Obtain the single instance of SimpleKit


getTransactionFactory

protected TransactionFactory getTransactionFactory()
Specified by:
getTransactionFactory in class OTMKit
See Also:
OTMKit.getTransactionFactory()

getSwizzlingStrategy

public Swizzling getSwizzlingStrategy()
Specified by:
getSwizzlingStrategy in interface Kit
Specified by:
getSwizzlingStrategy in class OTMKit
See Also:
OTMKit.getSwizzlingStrategy()

getLockWaitStrategy

public LockWaitStrategy getLockWaitStrategy()
Specified by:
getLockWaitStrategy in interface Kit
Specified by:
getLockWaitStrategy in class OTMKit
See Also:
OTMKit.getLockWaitStrategy()

getLockMap

public LockMap getLockMap()
Specified by:
getLockMap in interface Kit
Specified by:
getLockMap in class OTMKit
See Also:
OTMKit.getLockMap()

getCopyStrategy

public ObjectCopyStrategy getCopyStrategy(Identity oid)
Specified by:
getCopyStrategy in interface Kit
Specified by:
getCopyStrategy in class OTMKit
See Also:
OTMKit.getCopyStrategy(Identity)

isImplicitLockingUsed

public boolean isImplicitLockingUsed()
Should OTM implicitely lock all objects that are reachable from the explicitely locked object? The updates to the locked objects are automatically stored to the database at the end of transaction.

Specified by:
isImplicitLockingUsed in interface Kit
Specified by:
isImplicitLockingUsed in class OTMKit

isInsertVerified

public boolean isInsertVerified()
Should OTM verify each inserted object for presence in the database?

Specified by:
isInsertVerified in class OTMKit

isEagerInsert

public boolean isEagerInsert(Object obj)
Should OTM perform INSERTs for the given object eagerly or during commit?

Specified by:
isEagerInsert in class OTMKit


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.