Class AbstractEntityInformation<T,ID>
java.lang.Object
org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
- All Implemented Interfaces:
EntityInformation<T,
,ID> EntityMetadata<T>
public abstract class AbstractEntityInformation<T,ID>
extends Object
implements EntityInformation<T,ID>
Base class for implementations of
EntityInformation
. Considers an entity to be new whenever
EntityInformation.getId(Object)
returns null or the identifier is a Java primitive
and
EntityInformation.getId(Object)
returns zero.- Author:
- Oliver Gierke, Nick Williams, Mark Paluch, Johannes Englmeier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the actual domain class type.boolean
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
Methods inherited from interface org.springframework.data.repository.core.EntityInformation
getId, getIdType, getRequiredId
-
Constructor Details
-
AbstractEntityInformation
-
-
Method Details
-
isNew
Description copied from interface:EntityInformation
Returns whether the given entity is considered to be new.- Specified by:
isNew
in interfaceEntityInformation<T,
ID> - Parameters:
entity
- must never be null- Returns:
-
getJavaType
Description copied from interface:EntityMetadata
Returns the actual domain class type.- Specified by:
getJavaType
in interfaceEntityMetadata<T>
- Returns:
-