Spring Data Commons

org.springframework.data.repository.core
Interface EntityInformation<T,ID extends Serializable>

All Superinterfaces:
EntityMetadata<T>
All Known Implementing Classes:
AbstractEntityInformation, DelegatingEntityInformation, PersistableEntityInformation, ReflectionEntityInformation

public interface EntityInformation<T,ID extends Serializable>
extends EntityMetadata<T>

Extension of EntityMetadata to add functionality to query information of entity instances.

Author:
Oliver Gierke

Method Summary
 ID getId(T entity)
          Returns the id of the given entity.
 Class<ID> getIdType()
          Returns the type of the id of the entity.
 boolean isNew(T entity)
          Returns whether the given entity is considered to be new.
 
Methods inherited from interface org.springframework.data.repository.core.EntityMetadata
getJavaType
 

Method Detail

isNew

boolean isNew(T entity)
Returns whether the given entity is considered to be new.

Parameters:
entity - must never be null
Returns:

getId

ID getId(T entity)
Returns the id of the given entity.

Parameters:
entity - must never be null
Returns:

getIdType

Class<ID> getIdType()
Returns the type of the id of the entity.

Returns:

Spring Data Commons

Copyright © 2012. All Rights Reserved.