org.ektorp.support
Annotation Type TypeDiscriminator


@Target(value={METHOD,FIELD,TYPE})
@Retention(value=RUNTIME)
public @interface TypeDiscriminator

Used to distinguish a type's documents in the database. Declare on fields or getter methods in order for them to be used in generated views filter conditions. Declare on type in order specify a custom filter condition. A TypeDiscriminator declared on type level cannot be mixed with TypeDiscriminators declared onb fields.

Author:
henrik lundgren

Optional Element Summary
 String value
          If TypeDiscriminator is declared on type level, a filter condition must be specified.
 

value

public abstract String value
If TypeDiscriminator is declared on type level, a filter condition must be specified. This condition is inserted along other conditions in the generated views map function: function(doc) { if(CONDITION INSERTED HERE && doc.otherField) {emit(null, doc._id)} } Not valid to use if declared on field or method level.

Default:
""


Copyright © 2011. All Rights Reserved.