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)
IdentityFactory
Identity
for the given
persistence capable object.buildIdentity
in interface IdentityFactory
obj
- The object to build the Identity
forIdentityFactory.buildIdentity(Object)
public Identity buildIdentity(ClassDescriptor cld, java.lang.Object obj)
IdentityFactory
Identity
for the given
persistence capable object.buildIdentity
in interface IdentityFactory
cld
- 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)
IdentityFactory
Identity
for the given primary key values (composite PK's) of a
persistence capable object.buildIdentity
in interface IdentityFactory
realClass
- 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)
IdentityFactory
IdentityFactory.buildIdentity(java.lang.Class, java.lang.Class, java.lang.String[], java.lang.Object[])
.buildIdentity
in interface IdentityFactory
realClass
- 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)
IdentityFactory
Identity
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 IdentityFactory
realClass
- 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)
IdentityFactory
buildIdentity
in interface IdentityFactory
realClass
- The class of the associated objectpkValue
- The PK valueIdentityFactory.buildIdentity(Class, Object)
public void afterBegin(PBStateEvent event)
PBStateListener
afterBegin
in interface PBStateListener
event
- The event objectpublic void afterCommit(PBStateEvent event)
PBStateListener
afterCommit
in interface PBStateListener
event
- The event objectpublic void afterRollback(PBStateEvent event)
PBStateListener
afterRollback
in interface PBStateListener
event
- The event objectpublic void beforeClose(PBStateEvent event)
PBStateListener
PersistenceBroker
instance will be returned to the pool.beforeClose
in interface PBStateListener
event
- The event objectpublic void beforeRollback(PBStateEvent event)
PBStateListener
beforeRollback
in interface PBStateListener
event
- The event objectpublic void afterOpen(PBStateEvent event)
PBStateListener
PersistenceBroker
instance was
obtained from the pool.afterOpen
in interface PBStateListener
event
- The event objectpublic void beforeBegin(PBStateEvent event)
PBStateListener
beforeBegin
in interface PBStateListener
event
- The event objectpublic void beforeCommit(PBStateEvent event)
PBStateListener
beforeCommit
in interface PBStateListener
event
- 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