net.datacrow.core.data
Enum Operator

java.lang.Object
  extended by java.lang.Enum<Operator>
      extended by net.datacrow.core.data.Operator
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Operator>

public enum Operator
extends java.lang.Enum<Operator>

Contains operators which can be used in filters

Author:
Robert Jan van der Waals
See Also:
DataFilter, DataFilterEntry

Enum Constant Summary
AFTER
          The date is after a certain value
BEFORE
          The date is before a certain value
CONTAINS
          The string contains a certain value
DAYS_AFTER
           
DAYS_BEFORE
           
DOES_NOT_CONTAIN
          The string does not contains a certain value
ENDS_WITH
          The string ends with a certain value
EQUAL_TO
          Exact match
GREATER_THEN
          The number is greater then a certain value
IS_EMPTY
          The value is empty
IS_FILLED
          The value is set
LESS_THEN
          The number is less then a certain value
MONTHS_AGO
           
NOT_EQUAL_TO
          Does no match
STARTS_WITH
          The string starts with a certain value
TODAY
           
YEARS_AGO
           
 
Method Summary
static java.util.Collection<Operator> get(DcField field, boolean simple)
          Get all operators which can be applied on the specific field.
 int getIndex()
          The unique index of the filter.
 java.lang.String getName()
          The name of the operator.
 boolean needsValue()
          Indicates if the filter requires a value in order for it to be successful.
 java.lang.String toString()
           
static Operator valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Operator[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EQUAL_TO

public static final Operator EQUAL_TO
Exact match


NOT_EQUAL_TO

public static final Operator NOT_EQUAL_TO
Does no match


CONTAINS

public static final Operator CONTAINS
The string contains a certain value


DOES_NOT_CONTAIN

public static final Operator DOES_NOT_CONTAIN
The string does not contains a certain value


IS_EMPTY

public static final Operator IS_EMPTY
The value is empty


IS_FILLED

public static final Operator IS_FILLED
The value is set


STARTS_WITH

public static final Operator STARTS_WITH
The string starts with a certain value


ENDS_WITH

public static final Operator ENDS_WITH
The string ends with a certain value


LESS_THEN

public static final Operator LESS_THEN
The number is less then a certain value


GREATER_THEN

public static final Operator GREATER_THEN
The number is greater then a certain value


BEFORE

public static final Operator BEFORE
The date is before a certain value


AFTER

public static final Operator AFTER
The date is after a certain value


DAYS_BEFORE

public static final Operator DAYS_BEFORE

DAYS_AFTER

public static final Operator DAYS_AFTER

TODAY

public static final Operator TODAY

MONTHS_AGO

public static final Operator MONTHS_AGO

YEARS_AGO

public static final Operator YEARS_AGO
Method Detail

values

public static Operator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Operator c : Operator.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Operator valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getIndex

public int getIndex()
The unique index of the filter.


getName

public java.lang.String getName()
The name of the operator.


needsValue

public boolean needsValue()
Indicates if the filter requires a value in order for it to be successful.


get

public static java.util.Collection<Operator> get(DcField field,
                                                 boolean simple)
Get all operators which can be applied on the specific field.

Parameters:
field -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<Operator>