com.trg.search
Class Field

java.lang.Object
  extended by com.trg.search.Field
All Implemented Interfaces:
java.io.Serializable

public class Field
extends java.lang.Object
implements java.io.Serializable

Used to specify field selection in Search.

See Also:
Search, Serialized Form

Field Summary
protected  java.lang.String key
          The key to use for the property when using result mode RESULT_MAP.
static int OP_AVG
          Possible value for operator.
static int OP_COUNT
          Possible value for operator.
static int OP_COUNT_DISTINCT
          Possible value for operator.
static int OP_MAX
          Possible value for operator.
static int OP_MIN
          Possible value for operator.
static int OP_PROPERTY
          Possible value for operator.
static int OP_SUM
          Possible value for operator.
protected  int operator
          The operator to apply to the column: for example OP_COUNT, OP_SUM, OP_MAX.
protected  java.lang.String property
          The property to include in the result.
static java.lang.String ROOT_ENTITY
          Property string representing the root entity of the search.
 
Constructor Summary
Field()
           
Field(java.lang.String property)
           
Field(java.lang.String property, int operator)
           
Field(java.lang.String property, int operator, java.lang.String key)
           
Field(java.lang.String property, java.lang.String key)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getKey()
           
 int getOperator()
           
 java.lang.String getProperty()
           
 int hashCode()
           
 void setKey(java.lang.String key)
           
 void setOperator(int operator)
           
 void setProperty(java.lang.String property)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ROOT_ENTITY

public static final java.lang.String ROOT_ENTITY
Property string representing the root entity of the search. This is just the empty string ("").

See Also:
Constant Field Values

property

protected java.lang.String property
The property to include in the result.


key

protected java.lang.String key
The key to use for the property when using result mode RESULT_MAP.


operator

protected int operator
The operator to apply to the column: for example OP_COUNT, OP_SUM, OP_MAX. The default is OP_PROPERTY.


OP_PROPERTY

public static final int OP_PROPERTY
Possible value for operator. This is the default value and does not apply any operator to the column. All the rows in the result set are returned.

See Also:
Constant Field Values

OP_COUNT

public static final int OP_COUNT
Possible value for operator. This returns the number of rows in the result set where the given property is non-null.

See Also:
Constant Field Values

OP_COUNT_DISTINCT

public static final int OP_COUNT_DISTINCT
Possible value for operator. This returns the number of distinct values of the given property in the result set.

See Also:
Constant Field Values

OP_MAX

public static final int OP_MAX
Possible value for operator. This returns the maximum value of the given property in the result set.

See Also:
Constant Field Values

OP_MIN

public static final int OP_MIN
Possible value for operator. This returns the minimum value of the given property in the result set.

See Also:
Constant Field Values

OP_SUM

public static final int OP_SUM
Possible value for operator. This returns the sum of the given property in all rows of the result set.

See Also:
Constant Field Values

OP_AVG

public static final int OP_AVG
Possible value for operator. This returns the average value of the given property in the result set.

See Also:
Constant Field Values
Constructor Detail

Field

public Field()

Field

public Field(java.lang.String property)

Field

public Field(java.lang.String property,
             java.lang.String key)

Field

public Field(java.lang.String property,
             int operator)

Field

public Field(java.lang.String property,
             int operator,
             java.lang.String key)
Method Detail

getProperty

public java.lang.String getProperty()

setProperty

public void setProperty(java.lang.String property)

getKey

public java.lang.String getKey()

setKey

public void setKey(java.lang.String key)

getOperator

public int getOperator()

setOperator

public void setOperator(int operator)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008-2010 eBM WebSourcing. All Rights Reserved.