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) |
getCompositeIdAttributeValue, getEntityName, getIdAttribute, getIdAttributeNames, getIdType, hasCompositeId
getMetadata
getJavaType
public JpaPersistableEntityInformation(Class<T> domainClass, javax.persistence.metamodel.Metamodel metamodel)
JpaPersistableEntityInformation
for the given domain class and Metamodel
.domainClass
- must not be null.metamodel
- must not be null.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 JpaMetamodelEntityInformation<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 © 2017. All rights reserved.