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

java.lang.Object
  extended by 
      extended by org.springframework.data.document.mongodb.mapping.MongoPersistentEntity<T>

public class MongoPersistentEntity<T>
extends

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
protected  java.lang.String collection
           
 
Constructor Summary
MongoPersistentEntity(MappingContext mappingContext, TypeInformation typeInformation)
          Creates a new MongoPersistentEntity with the given MappingContext and TypeInformation.
 
Method Summary
 java.lang.String getCollection()
          Returns the collection the entity should be stored in.
 void setCollection(java.lang.String collection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

collection

protected java.lang.String collection
Constructor Detail

MongoPersistentEntity

public MongoPersistentEntity(MappingContext mappingContext,
                             TypeInformation typeInformation)
Creates a new MongoPersistentEntity with the given MappingContext and TypeInformation. Will default the collection name to the entities simple type name.

Parameters:
mappingContext -
typeInformation -
Method Detail

getCollection

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

Returns:

setCollection

public void setCollection(java.lang.String collection)