Spring Data Document

org.springframework.data.mongodb.core.mapping
Annotation Type Field


@Documented
@Retention(value=RUNTIME)
public @interface Field

Annotation to define custom metadata for document fields.

Author:
Oliver Gierke

Optional Element Summary
 int order
          The order in which various fields shall be stored.
 String value
          The key to be used to store the field inside the document.
 

value

public abstract String value
The key to be used to store the field inside the document.

Returns:
Default:
""

order

public abstract int order
The order in which various fields shall be stored. Has to be a positive integer.

Returns:
the order the field shall have in the document or -1 if undefined.
Default:
2147483647

Spring Data Document

Copyright © 2012. All Rights Reserved.