org.sormula.annotation
Annotation Type Where


@Inherited
@Target(value={TYPE,ANNOTATION_TYPE})
@Retention(value=RUNTIME)
public @interface Where

Defines columns to be used in a where condition for a row class. Use this to annotate a row class, Table subclass, SqlOperation or within Wheres annotation.

Since:
1.0
Author:
Jeff Miller

Required Element Summary
 java.lang.String name
          Name of where condition.
 
Optional Element Summary
 java.lang.String[] fieldNames
          Define condition where all fields in the condition use "=" comparison operator and are joined logically by "AND" boolean operator.
 WhereField[] whereFields
          Define condition where one or more fields use comparison operator or boolean operator other than the defaults.
 

Element Detail

name

public abstract java.lang.String name
Name of where condition. Must be unique amoung all where conditions for a row class.

Returns:
name of where condition
See Also:
SqlOperation.setWhere(String)

fieldNames

public abstract java.lang.String[] fieldNames
Define condition where all fields in the condition use "=" comparison operator and are joined logically by "AND" boolean operator. This is a typical type of where condition and allows for simpler annotation syntax. Use this instead of whereFields().

Returns:
array of field names to be used in where condition
Default:
{}

whereFields

public abstract WhereField[] whereFields
Define condition where one or more fields use comparison operator or boolean operator other than the defaults. Use this instead of fieldNames().

Returns:
array of column conditions in where condition
Default:
{}