org.sormula.annotation
Annotation Type OrderBy


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

Defines columns to be used in a order phrase. Use this to annotate a row class, Table subclass, SqlOperation or within OrderBys annotation.

Use only one of these methods: ascending(), descending(), or orderByFields().

Since:
1.0
Author:
Jeff Miller

Required Element Summary
 java.lang.String name
          Name of the order by phrase.
 
Optional Element Summary
 java.lang.String[] ascending
          Define fields where all are ascending order.
 java.lang.String[] descending
          Define fields where all are descending order.
 OrderByField[] orderByFields
          Define fields that are mix of ascending and descending order.
 

Element Detail

name

public abstract java.lang.String name
Name of the order by phrase. Must be unique amoung all order by names for a row class.

Returns:
name of order phrase

ascending

public abstract java.lang.String[] ascending
Define fields where all are ascending order. This is typical situation and allows for simpler annotation syntax. Use this instead of orderByFields().

Returns:
array of field names for ascending order
Default:
{}

descending

public abstract java.lang.String[] descending
Define fields where all are descending order. This is typical situation and allows for simpler annotation syntax. Use this instead of orderByFields().

Returns:
array of field names for descending order
Default:
{}

orderByFields

public abstract OrderByField[] orderByFields
Define fields that are mix of ascending and descending order. Use this instead of ascending() or descending().

Returns:
array of column conditions in order phrase
Default:
{}