org.synyx.hades.dao.orm
Class GenericDaoSupport.ReflectiveEntityInformation

java.lang.Object
  extended by org.synyx.hades.dao.orm.GenericDaoSupport.ReflectiveEntityInformation
All Implemented Interfaces:
GenericDaoSupport.IdAware, GenericDaoSupport.IsNewAware
Enclosing class:
GenericDaoSupport<T>

public static class GenericDaoSupport.ReflectiveEntityInformation
extends java.lang.Object
implements GenericDaoSupport.IsNewAware, GenericDaoSupport.IdAware

GenericDaoSupport.IsNewAware implementation that reflectively checks a Field or Method annotated with Id.

Author:
Oliver Gierke

Constructor Summary
GenericDaoSupport.ReflectiveEntityInformation(java.lang.Class<?> domainClass)
          Creates a new GenericDaoSupport.ReflectiveEntityInformation by inspecting the given class for a Field or Method for and Id annotation.
 
Method Summary
 java.lang.Object getId(java.lang.Object entity)
           
 boolean isNew(java.lang.Object entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDaoSupport.ReflectiveEntityInformation

public GenericDaoSupport.ReflectiveEntityInformation(java.lang.Class<?> domainClass)
Creates a new GenericDaoSupport.ReflectiveEntityInformation by inspecting the given class for a Field or Method for and Id annotation.

Parameters:
domainClass - not null, must be annotated with Entity and carry an anootation defining the id property.
Method Detail

isNew

public boolean isNew(java.lang.Object entity)
Specified by:
isNew in interface GenericDaoSupport.IsNewAware

getId

public java.lang.Object getId(java.lang.Object entity)
Specified by:
getId in interface GenericDaoSupport.IdAware


Copyright © 2009-2010 Synyx GmbH & Co. KG. All Rights Reserved.