public class JpaPersistableEntityInformation<T extends org.springframework.data.domain.Persistable<ID>,ID extends Serializable> extends JpaMetamodelEntityInformation<T,ID>
JpaMetamodelEntityInformation
that consideres methods of Persistable
to lookup the id.Constructor and Description |
---|
JpaPersistableEntityInformation(Class<T> domainClass,
javax.persistence.metamodel.Metamodel metamodel)
Creates a new
JpaPersistableEntityInformation for the given domain class and Metamodel . |
Modifier and Type | Method and Description |
---|---|
ID |
getId(T entity) |
boolean |
isNew(T entity) |
getIdAttribute, getIdType
getEntityName, getMetadata
getJavaType
public JpaPersistableEntityInformation(Class<T> domainClass, javax.persistence.metamodel.Metamodel metamodel)
JpaPersistableEntityInformation
for the given domain class and Metamodel
.domainClass
- metamodel
- public boolean isNew(T entity)
isNew
in interface org.springframework.data.repository.core.EntityInformation<T extends org.springframework.data.domain.Persistable<ID>,ID extends Serializable>
isNew
in class org.springframework.data.repository.core.support.AbstractEntityInformation<T extends org.springframework.data.domain.Persistable<ID>,ID extends Serializable>
public ID getId(T entity)
getId
in interface org.springframework.data.repository.core.EntityInformation<T extends org.springframework.data.domain.Persistable<ID>,ID extends Serializable>
getId
in class JpaMetamodelEntityInformation<T extends org.springframework.data.domain.Persistable<ID>,ID extends Serializable>
Copyright © 2011-2012-2012 SpringSource. All Rights Reserved.