org.apache.ojb.broker.core
Class IdentityFactoryImpl

java.lang.Object
  extended byorg.apache.ojb.broker.core.IdentityFactoryImpl
All Implemented Interfaces:
IdentityFactory

public class IdentityFactoryImpl
extends java.lang.Object
implements IdentityFactory

Version:
$Id: IdentityFactoryImpl.java,v 1.2.2.2 2005/03/23 12:39:57 arminw Exp $
Author:
Armin Waibel
See Also:
IdentityFactory

Constructor Summary
IdentityFactoryImpl(PersistenceBroker broker)
           
 
Method Summary
 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 method for 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityFactoryImpl

public IdentityFactoryImpl(PersistenceBroker broker)
Method Detail

buildIdentity

public Identity buildIdentity(java.lang.Object obj)
Description copied from interface: IdentityFactory
Build a unique Identity for the given persistence capable object.

Specified by:
buildIdentity in interface IdentityFactory
Parameters:
obj - The object to build the Identity for.
Returns:
The a new created Identity object.
See Also:
IdentityFactory.buildIdentity(java.lang.Object)

buildIdentity

public Identity buildIdentity(ClassDescriptor cld,
                              java.lang.Object obj)
Description copied from interface: IdentityFactory
Build a unique Identity for the given persistence capable object.

Specified by:
buildIdentity in interface IdentityFactory
Parameters:
cld - The ClassDescriptor of the object.
obj - The object to build the Identity for.
Returns:
The a new created Identity object.
See Also:
IdentityFactory.buildIdentity(java.lang.Object)

buildIdentity

public Identity buildIdentity(java.lang.Class realClass,
                              java.lang.Class topLevelClass,
                              java.lang.String[] pkFieldNames,
                              java.lang.Object[] pkValues)
Description copied from interface: IdentityFactory
Build a unique Identity for the given primary key values (composite PK's) of a persistence capable object.

Specified by:
buildIdentity in interface IdentityFactory
Parameters:
realClass - The class of the associated object.
topLevelClass - The top-level class of the associated object.
pkFieldNames - The field names of the PK fields.
pkValues - The PK values.
Returns:
The a new created Identity object.
See Also:
IdentityFactory.buildIdentity(java.lang.Class, java.lang.Class, java.lang.String[], java.lang.Object[])

buildIdentity

public Identity buildIdentity(java.lang.Class realClass,
                              java.lang.String[] pkFieldNames,
                              java.lang.Object[] pkValues)
Description copied from interface: IdentityFactory
Convenience method for IdentityFactory.buildIdentity(java.lang.Class, java.lang.Class, java.lang.String[], java.lang.Object[])

Specified by:
buildIdentity in interface IdentityFactory
See Also:
IdentityFactory.buildIdentity(java.lang.Class, java.lang.String[], java.lang.Object[])

buildIdentity

public Identity buildIdentity(java.lang.Class realClass,
                              java.lang.Class topLevelClass,
                              java.lang.Object[] pkValues)
Description copied from interface: IdentityFactory
Create a new 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.

Specified by:
buildIdentity in interface IdentityFactory
Parameters:
realClass - The class of the associated object.
topLevelClass - The top-level class of the associated object.
pkValues - The PK values.
Returns:
The a new created Identity object.
See Also:
IdentityFactory.buildIdentity(java.lang.Class, java.lang.String[], java.lang.Object[])

buildIdentity

public Identity buildIdentity(java.lang.Class realClass,
                              java.lang.Object pkValue)
Description copied from interface: IdentityFactory
Convenience method for persistent objects with single primary key. NOTE: Do not use for objects with composed PK!

Specified by:
buildIdentity in interface IdentityFactory
Parameters:
realClass - The class of the associated object.
pkValue - The PK value.
Returns:
The a new created Identity object.
See Also:
IdentityFactory.buildIdentity(java.lang.Class, java.lang.Object)


(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.3, 2005-04-2