org.springframework.data.document.mongodb.mapping
Class BasicMongoPersistentEntity<T>

java.lang.Object
  extended by 
      extended by org.springframework.data.document.mongodb.mapping.BasicMongoPersistentEntity<T>
All Implemented Interfaces:
MongoPersistentEntity<T>

public class BasicMongoPersistentEntity<T>
extends
implements MongoPersistentEntity<T>

Mongo specific PersistentEntity implementation that adds Mongo specific meta-data such as the collection name and the like.

Author:
Jon Brisbin , Oliver Gierke

Field Summary
private  java.lang.String collection
           
private  boolean isRootEntity
           
 
Constructor Summary
BasicMongoPersistentEntity( typeInformation)
          Creates a new BasicMongoPersistentEntity with the given TypeInformation.
 
Method Summary
 java.lang.String getCollection()
          Returns the collection the entity should be stored in.
 void verify()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

collection

private final java.lang.String collection

isRootEntity

private final boolean isRootEntity
Constructor Detail

BasicMongoPersistentEntity

public BasicMongoPersistentEntity( typeInformation)
Creates a new BasicMongoPersistentEntity with the given TypeInformation. Will default the collection name to the entities simple type name.

Parameters:
typeInformation -
Method Detail

getCollection

public java.lang.String getCollection()
Returns the collection the entity should be stored in.

Specified by:
getCollection in interface MongoPersistentEntity<T>
Returns:

verify

public void verify()