Spring Data Document

org.springframework.data.mongodb.core.mapping
Interface MongoPersistentEntity<T>

All Superinterfaces:
org.springframework.data.mapping.PersistentEntity<T,MongoPersistentProperty>
All Known Implementing Classes:
BasicMongoPersistentEntity

public interface MongoPersistentEntity<T>
extends org.springframework.data.mapping.PersistentEntity<T,MongoPersistentProperty>

MongoDB specific PersistentEntity abstraction.

Author:
Oliver Gierke, Patryk Wasik

Method Summary
 String getCollection()
          Returns the collection the entity shall be persisted to.
 MongoPersistentProperty getVersionProperty()
          Returns the MongoPersistentProperty that represents the version attribute of an entity.
 boolean hasVersionProperty()
          Returns whether the entity has a property representing the version of the entity.
 
Methods inherited from interface org.springframework.data.mapping.PersistentEntity
doWithAssociations, doWithProperties, getIdProperty, getName, getPersistenceConstructor, getPersistentProperty, getType, getTypeAlias, getTypeInformation, isConstructorArgument, isIdProperty
 

Method Detail

getCollection

String getCollection()
Returns the collection the entity shall be persisted to.

Returns:

getVersionProperty

MongoPersistentProperty getVersionProperty()
Returns the MongoPersistentProperty that represents the version attribute of an entity. Will not be null if hasVersionProperty().

Returns:

hasVersionProperty

boolean hasVersionProperty()
Returns whether the entity has a property representing the version of the entity.

Returns:

Spring Data Document

Copyright © 2012. All Rights Reserved.