com.sun.identity.log
Class QueryElement

java.lang.Object
  |
  +--com.sun.identity.log.QueryElement

public class QueryElement
extends java.lang.Object

QueryElement class defines each individual query format. It stores fieldname, value and relation between them. Currently it supports Equal, not equal, greater than, lesser than, greater than equal and lesser than equal relations.


Field Summary
static int EQ
           
static int GE
           
static int GT
           
static int LE
           
static int LT
           
static int NE
           
static int NV
           
 
Constructor Summary
QueryElement()
          Default constructor.
QueryElement(java.lang.String fld, java.lang.String val, int rel)
          Constructor.
 
Method Summary
 java.lang.String getFieldName()
          It returns the fieldname on which query to be applied
 java.lang.String getFieldValue()
          This method returns the value of the field to be compared as stored in the query element.
 int getRelation()
          This method returns relation to be applied inbetween field and value as stored in the query element.
 void setFieldName(java.lang.String field)
          This method sets the fieldname for this query element.
 void setFieldValue(java.lang.String value)
          This method sets the value for the fieldname in this query element.
 void setRelation(int value)
          This method modifies/sets the relation between field name and value in this query element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NV

public static final int NV

GT

public static final int GT

LT

public static final int LT

EQ

public static final int EQ

NE

public static final int NE

GE

public static final int GE

LE

public static final int LE
Constructor Detail

QueryElement

public QueryElement(java.lang.String fld,
                    java.lang.String val,
                    int rel)
             throws java.lang.IllegalArgumentException
Constructor.
Parameters:
fld - name of the field to be set.
val - value of the field to be set.
rel - relation between field and value to be checked.

QueryElement

public QueryElement()
Default constructor. Allocates memory for respective items. All the fields to be set before use.
Method Detail

getFieldName

public java.lang.String getFieldName()
It returns the fieldname on which query to be applied
Returns:
fieldName present in this query element.

getFieldValue

public java.lang.String getFieldValue()
This method returns the value of the field to be compared as stored in the query element.
Returns:
fieldValue value of the field to be queried.

getRelation

public int getRelation()
This method returns relation to be applied inbetween field and value as stored in the query element.
Returns:
relation between field and value that to be checked.

setFieldName

public void setFieldName(java.lang.String field)
This method sets the fieldname for this query element.
Parameters:
field - field or column name of the log record

setFieldValue

public void setFieldValue(java.lang.String value)
This method sets the value for the fieldname in this query element.
Parameters:
value - field/column value of the log record

setRelation

public void setRelation(int value)
                 throws java.lang.IllegalArgumentException
This method modifies/sets the relation between field name and value in this query element.
Parameters:
value - relation between field and value to be matched.
Throws:
java.lang.IllegalArgumentException - if relation is invalid.