ch.elca.el4j.services.persistence.hibernate
Class HibernatePrimaryKeyObjectIdentityFixer
java.lang.Object
ch.elca.el4j.services.persistence.generic.dao.AbstractIdentityFixer
ch.elca.el4j.services.persistence.hibernate.HibernateProxyAwareIdentityFixer
ch.elca.el4j.services.persistence.hibernate.HibernatePrimaryKeyObjectIdentityFixer
public class HibernatePrimaryKeyObjectIdentityFixer
- extends HibernateProxyAwareIdentityFixer
An identity fixer for objects loaded by hibernate and implementing the PrimaryKeyObject
interface.
- Author:
- Andreas Rueedlinger (ARR)
- See Also:
HibernateProxyAwareIdentityFixer
- File-location:
- HibernatePrimaryKeyObjectIdentityFixer
- Last check-in date:
- 2009-08-04 14:35:53 +0200 (Di, 04. Aug 2009) by swismer for revision 3875
Methods inherited from class ch.elca.el4j.services.persistence.generic.dao.AbstractIdentityFixer |
getChangeNotifier, getRepresentatives, instanceAccessibleObjects, instanceFields, isRepresentative, merge, merge, merge, merge, removeRepresentative, reverseMerge, reverseMerge, reverseMerge |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernatePrimaryKeyObjectIdentityFixer
public HibernatePrimaryKeyObjectIdentityFixer()
id
protected Object id(Object o)
- Returns the globally unique, logical id for the provided object, or
null
, if it has no id (yet), or AbstractIdentityFixer.ANONYMOUS
is this
object is of value type. o
may be null, point to an ordinary
object or to an array.
The ID objects returned by this method must be value-comparable using
equals
(which implies that hashCode must be overridden as well).
To permit garbage-collection, ids referring to the object they identify
should do so with weak references.
- Overrides:
id
in class HibernateProxyAwareIdentityFixer
- Parameters:
o
- The object for which a globally unique, logical id will be
returned
- Returns:
- A globally unique, logical ID object for the given object
Copyright © 2005-2011 ELCA. All Rights Reserved.