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

java.lang.Object
  extended by org.synyx.hades.dao.orm.GenericDaoSupport.ReflectiveIsNewStrategy
All Implemented Interfaces:
GenericDaoSupport.IsNewStrategy
Enclosing class:
GenericDaoSupport<T>

public static class GenericDaoSupport.ReflectiveIsNewStrategy
extends java.lang.Object
implements GenericDaoSupport.IsNewStrategy

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

Author:
Oliver Gierke

Constructor Summary
GenericDaoSupport.ReflectiveIsNewStrategy(java.lang.Class<?> domainClass)
          Creates a new GenericDaoSupport.ReflectiveIsNewStrategy by inspecting the given class for a Field or Method for and Id annotation.
 
Method Summary
 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.ReflectiveIsNewStrategy

public GenericDaoSupport.ReflectiveIsNewStrategy(java.lang.Class<?> domainClass)
Creates a new GenericDaoSupport.ReflectiveIsNewStrategy 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.IsNewStrategy


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