public class IdentityFactoryImpl extends java.lang.Object implements IdentityFactory, PBStateListener
IdentityFactory| Constructor and Description |
|---|
IdentityFactoryImpl(PersistenceBroker broker) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterBegin(PBStateEvent event)
Called after a transaction was started.
|
void |
afterCommit(PBStateEvent event)
Called after a transaction was comitted.
|
void |
afterOpen(PBStateEvent event)
Called after the
PersistenceBroker instance was
obtained from the pool. |
void |
afterRollback(PBStateEvent event)
Called after a transaction was rolled back.
|
void |
beforeBegin(PBStateEvent event)
Called before a transaction was started.
|
void |
beforeClose(PBStateEvent event)
Called before the
PersistenceBroker
instance will be returned to the pool. |
void |
beforeCommit(PBStateEvent event)
Called before a transaction will be comitted.
|
void |
beforeRollback(PBStateEvent event)
Called before a transaction will be rolled back.
|
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.Class topLevelClass,
java.lang.Object[] pkValues)
Create a new
Identity object based on given arguments - NOTE: There
will be no check to resolve the order of the PK values. |
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.Class topLevelClass,
java.lang.String[] pkFieldNames,
java.lang.Object[] pkValues)
Build a unique
Identity
for the given primary key values (composite PK's) of a
persistence capable object. |
Identity |
buildIdentity(ClassDescriptor cld,
java.lang.Object obj)
Build a unique
Identity for the given
persistence capable object. |
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.Object pkValue)
Convenience method for persistent objects with single primary key.
|
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.String[] pkFieldNames,
java.lang.Object[] pkValues)
Convenience shortcut method for
IdentityFactory.buildIdentity(java.lang.Class, java.lang.Class, java.lang.String[], java.lang.Object[]). |
Identity |
buildIdentity(java.lang.Object obj)
Build a unique
Identity for the given
persistence capable object. |
public IdentityFactoryImpl(PersistenceBroker broker)
public Identity buildIdentity(java.lang.Object obj)
IdentityFactoryIdentity for the given
persistence capable object.buildIdentity in interface IdentityFactoryobj - The object to build the Identity forIdentityFactory.buildIdentity(Object)public Identity buildIdentity(ClassDescriptor cld, java.lang.Object obj)
IdentityFactoryIdentity for the given
persistence capable object.buildIdentity in interface IdentityFactorycld - The ClassDescriptor of the objectobj - The object to build the Identity forIdentityFactory.buildIdentity(Object)public Identity buildIdentity(java.lang.Class realClass, java.lang.Class topLevelClass, java.lang.String[] pkFieldNames, java.lang.Object[] pkValues)
IdentityFactoryIdentity
for the given primary key values (composite PK's) of a
persistence capable object.buildIdentity in interface IdentityFactoryrealClass - The class of the associated objecttopLevelClass - The top-level class of the associated objectpkFieldNames - The field names of the PK fieldspkValues - The PK valuesIdentityFactory.buildIdentity(Class, Class, String[], Object[])public Identity buildIdentity(java.lang.Class realClass, java.lang.String[] pkFieldNames, java.lang.Object[] pkValues)
IdentityFactoryIdentityFactory.buildIdentity(java.lang.Class, java.lang.Class, java.lang.String[], java.lang.Object[]).buildIdentity in interface IdentityFactoryrealClass - The class of the associated objectpkFieldNames - The field names of the PK fieldspkValues - The PK valuesIdentityFactory.buildIdentity(Class, String[], Object[])public Identity buildIdentity(java.lang.Class realClass, java.lang.Class topLevelClass, java.lang.Object[] pkValues)
IdentityFactoryIdentity object based on given arguments - NOTE: There
will be no check to resolve the order of the PK values. This method expect
the correct order based on the declaration of the FieldDescriptor
in the mapping file.buildIdentity in interface IdentityFactoryrealClass - The class of the associated objecttopLevelClass - The top-level class of the associated objectpkValues - The PK valuesIdentityFactory.buildIdentity(Class, String[], Object[])public Identity buildIdentity(java.lang.Class realClass, java.lang.Object pkValue)
IdentityFactorybuildIdentity in interface IdentityFactoryrealClass - The class of the associated objectpkValue - The PK valueIdentityFactory.buildIdentity(Class, Object)public void afterBegin(PBStateEvent event)
PBStateListenerafterBegin in interface PBStateListenerevent - The event objectpublic void afterCommit(PBStateEvent event)
PBStateListenerafterCommit in interface PBStateListenerevent - The event objectpublic void afterRollback(PBStateEvent event)
PBStateListenerafterRollback in interface PBStateListenerevent - The event objectpublic void beforeClose(PBStateEvent event)
PBStateListenerPersistenceBroker
instance will be returned to the pool.beforeClose in interface PBStateListenerevent - The event objectpublic void beforeRollback(PBStateEvent event)
PBStateListenerbeforeRollback in interface PBStateListenerevent - The event objectpublic void afterOpen(PBStateEvent event)
PBStateListenerPersistenceBroker instance was
obtained from the pool.afterOpen in interface PBStateListenerevent - The event objectpublic void beforeBegin(PBStateEvent event)
PBStateListenerbeforeBegin in interface PBStateListenerevent - The event objectpublic void beforeCommit(PBStateEvent event)
PBStateListenerbeforeCommit in interface PBStateListenerevent - The event object(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30