org.springframework.data.repository.core.support
Class AbstractEntityInformation<T,ID extends Serializable>
java.lang.Object
org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
- All Implemented Interfaces:
- EntityInformation<T,ID>, EntityMetadata<T>
- Direct Known Subclasses:
- PersistableEntityInformation
public abstract class AbstractEntityInformation<T,ID extends Serializable>
- extends Object
- implements EntityInformation<T,ID>
Base class for implementations of EntityInformation
. Considers an entity to be new whenever
EntityInformation.getId(Object)
returns null.
- Author:
- Oliver Gierke
Method Summary |
Class<T> |
getJavaType()
Returns the actual domain class type. |
boolean |
isNew(T entity)
Returns whether the given entity is considered to be new. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractEntityInformation
public AbstractEntityInformation(Class<T> domainClass)
- Creates a new
AbstractEntityInformation
from the given domain class.
- Parameters:
domainClass
-
isNew
public boolean isNew(T entity)
- Description copied from interface:
EntityInformation
- Returns whether the given entity is considered to be new.
- Specified by:
isNew
in interface EntityInformation<T,ID extends Serializable>
- Parameters:
entity
- must never be null
- Returns:
getJavaType
public Class<T> getJavaType()
- Description copied from interface:
EntityMetadata
- Returns the actual domain class type.
- Specified by:
getJavaType
in interface EntityMetadata<T>
- Returns:
Copyright © 2012. All Rights Reserved.