org.springframework.data.mongodb.repository.support
Class DefaultEntityInformationCreator

java.lang.Object
  extended by org.springframework.data.mongodb.repository.support.DefaultEntityInformationCreator
All Implemented Interfaces:
EntityInformationCreator

public class DefaultEntityInformationCreator
extends Object
implements EntityInformationCreator

Simple EntityInformationCreator to to create MongoEntityInformation instances based on a MappingContext.

Author:
Oliver Gierke

Constructor Summary
DefaultEntityInformationCreator(org.springframework.data.mapping.context.MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
           
 
Method Summary
<T,ID extends Serializable>
MongoEntityInformation<T,ID>
getEntityInformation(Class<T> domainClass)
          Returns a MongoEntityInformation for the given domain class.
<T,ID extends Serializable>
MongoEntityInformation<T,ID>
getEntityInformation(Class<T> domainClass, Class<?> collectionClass)
          Returns a MongoEntityInformation for the given domain class and class to retrieve the collection to query against from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEntityInformationCreator

public DefaultEntityInformationCreator(org.springframework.data.mapping.context.MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
Method Detail

getEntityInformation

public <T,ID extends Serializable> MongoEntityInformation<T,ID> getEntityInformation(Class<T> domainClass)
Description copied from interface: EntityInformationCreator
Returns a MongoEntityInformation for the given domain class.

Specified by:
getEntityInformation in interface EntityInformationCreator
Parameters:
domainClass - the domain class to create the MongoEntityInformation for, must not be null.
Returns:

getEntityInformation

public <T,ID extends Serializable> MongoEntityInformation<T,ID> getEntityInformation(Class<T> domainClass,
                                                                                     Class<?> collectionClass)
Description copied from interface: EntityInformationCreator
Returns a MongoEntityInformation for the given domain class and class to retrieve the collection to query against from.

Specified by:
getEntityInformation in interface EntityInformationCreator
Parameters:
domainClass - the domain class to create the MongoEntityInformation for, must not be null.
collectionClass - the class to derive the collection from queries to retrieve the domain classes from shall be ran against, must not be null.
Returns:


Copyright © 2011. All Rights Reserved.