org.springframework.data.jpa.repository.support
Class JpaPersistableEntityInformation<T extends Persistable<ID>,ID extends Serializable>
java.lang.Object
org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
org.springframework.data.jpa.repository.support.JpaEntityInformationSupport<T,ID>
org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation<T,ID>
org.springframework.data.jpa.repository.support.JpaPersistableEntityInformation<T,ID>
- All Implemented Interfaces:
- JpaEntityInformation<T,ID>, EntityInformation<T,ID>, EntityMetadata<T>
public class JpaPersistableEntityInformation<T extends Persistable<ID>,ID extends Serializable>
- extends JpaMetamodelEntityInformation<T,ID>
Extension of JpaMetamodelEntityInformation that consideres methods of Persistable to lookup the id.
- Author:
- Oliver Gierke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpaPersistableEntityInformation
public JpaPersistableEntityInformation(Class<T> domainClass,
javax.persistence.metamodel.Metamodel metamodel)
- Creates a new
JpaPersistableEntityInformation for the given domain class and Metamodel.
- Parameters:
domainClass - metamodel -
isNew
public boolean isNew(T entity)
- Specified by:
isNew in interface EntityInformation<T extends Persistable<ID>,ID extends Serializable>- Overrides:
isNew in class AbstractEntityInformation<T extends Persistable<ID>,ID extends Serializable>
getId
public ID getId(T entity)
- Specified by:
getId in interface EntityInformation<T extends Persistable<ID>,ID extends Serializable>- Overrides:
getId in class JpaMetamodelEntityInformation<T extends Persistable<ID>,ID extends Serializable>
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.