org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.accessor
Class OidAccessor

java.lang.Object
  extended by org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.accessor.OidAccessor
All Implemented Interfaces:
org.hibernate.property.PropertyAccessor

public class OidAccessor
extends java.lang.Object
implements org.hibernate.property.PropertyAccessor

Accesses NakedObjects oids. The object id must always he held, but if a class doesn't declare an id field then this accessor will store it in the Naked Objects adapter.

It would be better to have a method on the naked object such as

 void setId(Long id) {
     this.id = id;
 }
 
 Long getId() {
     return id;
 }
 
and use a property accessor to access that property.


Nested Class Summary
static class OidAccessor.OidGetter
           
static class OidAccessor.OidSetter
           
 
Constructor Summary
OidAccessor()
           
 
Method Summary
 org.hibernate.property.Getter getGetter(java.lang.Class theClass, java.lang.String propertyName)
           
 org.hibernate.property.Setter getSetter(java.lang.Class theClass, java.lang.String propertyName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OidAccessor

public OidAccessor()
Method Detail

getSetter

public org.hibernate.property.Setter getSetter(java.lang.Class theClass,
                                               java.lang.String propertyName)
                                        throws org.hibernate.PropertyNotFoundException
Specified by:
getSetter in interface org.hibernate.property.PropertyAccessor
Throws:
org.hibernate.PropertyNotFoundException

getGetter

public org.hibernate.property.Getter getGetter(java.lang.Class theClass,
                                               java.lang.String propertyName)
                                        throws org.hibernate.PropertyNotFoundException
Specified by:
getGetter in interface org.hibernate.property.PropertyAccessor
Throws:
org.hibernate.PropertyNotFoundException


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.