Spring Data MongoDB - Core

org.springframework.data.mongodb.core.convert
Class QueryMapper.Field

java.lang.Object
  extended by org.springframework.data.mongodb.core.convert.QueryMapper.Field
Direct Known Subclasses:
QueryMapper.MetadataBackedField
Enclosing class:
QueryMapper

protected static class QueryMapper.Field
extends Object

Value object to represent a field and its meta-information.

Author:
Oliver Gierke

Field Summary
protected  String name
           
 
Constructor Summary
QueryMapper.Field(String name)
          Creates a new DocumentField without meta-information but the given name.
 
Method Summary
 String getMappedKey()
          Returns the key to be used in the mapped document eventually.
 MongoPersistentProperty getProperty()
          Returns the underlying MongoPersistentProperty backing the field.
 MongoPersistentEntity<?> getPropertyEntity()
          Returns the MongoPersistentEntity that field is conatined in.
 boolean isAssociation()
          Returns whether the field represents an association.
 boolean isIdField()
          Returns whether the current field is the id field.
 QueryMapper.Field with(String name)
          Returns a new DocumentField with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final String name
Constructor Detail

QueryMapper.Field

public QueryMapper.Field(String name)
Creates a new DocumentField without meta-information but the given name.

Parameters:
name - must not be null or empty.
Method Detail

with

public QueryMapper.Field with(String name)
Returns a new DocumentField with the given name.

Parameters:
name - must not be null or empty.
Returns:

isIdField

public boolean isIdField()
Returns whether the current field is the id field.

Returns:

getProperty

public MongoPersistentProperty getProperty()
Returns the underlying MongoPersistentProperty backing the field.

Returns:

getPropertyEntity

public MongoPersistentEntity<?> getPropertyEntity()
Returns the MongoPersistentEntity that field is conatined in.

Returns:

isAssociation

public boolean isAssociation()
Returns whether the field represents an association.

Returns:

getMappedKey

public String getMappedKey()
Returns the key to be used in the mapped document eventually.

Returns:

Spring Data MongoDB - Core

Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.