com.adobe.repository.query
Class Query.Statement

java.lang.Object
  extended by com.adobe.repository.query.Query.Statement
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Query

public static class Query.Statement
extends java.lang.Object
implements java.io.Serializable

This is the query statement class. A statement is made up of a left operand, an operator, and a right operand.

See Also:
Serialized Form

Field Summary
static int OPERATOR_BEGINS_WITH
          BEGINS WITH
static int OPERATOR_CONTAINS
          CONTAINS
static int OPERATOR_ENDS_WITH
          ENDS WITH
static int OPERATOR_EQUALS
          EQUALS
static int OPERATOR_GREATER_THAN
          GREATER THAN
static int OPERATOR_GREATER_THAN_EQUALS
          GREATER THAN EQUALS ( >=)
static int OPERATOR_LESS_THAN
          LESS THAN
static int OPERATOR_LESS_THAN_EQUALS
          LESS THAN EQUALS (<=)
static int OPERATOR_LIKE
          LIKE
static int OPERATOR_NOT_EQUALS
          NOT EQUALS
 
Constructor Summary
Query.Statement()
           
Query.Statement(int left_operand_constant, int operator, java.lang.String right_operand)
          Constructor that uses all required components.
Query.Statement(java.lang.String left_operand, int operator, java.lang.String right_operand)
          Constructor that uses all required components.
 
Method Summary
static java.lang.String attributeToString(int infomodelAttribute)
          This method converts an attribute value to a String.
 java.lang.String getLeftOperand()
          Retrieves the left operand.
 java.lang.String getNamespace()
          Retrieves the namespace.
 int getOperator()
          Retrieves the operator.
 java.lang.String getRightOperand()
          Retrieves the right operand.
 void setLeftOperand(java.lang.String leftOperand)
          Sets the left operand.
 void setLeftOperandWithConstant(int leftOperandConstant)
          Sets the left operand and the namespace.
 void setNamespace(java.lang.String namespace)
          Sets the namespace of the left operand.
 void setOperator(int operator)
          Set the operator for this statement.
 void setRightOperand(java.lang.String rightOperand)
          Sets the right operand.
 java.lang.String toString()
          Retrieves a String representation of this statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPERATOR_LIKE

public static final int OPERATOR_LIKE
LIKE

See Also:
Constant Field Values

OPERATOR_EQUALS

public static final int OPERATOR_EQUALS
EQUALS

See Also:
Constant Field Values

OPERATOR_LESS_THAN

public static final int OPERATOR_LESS_THAN
LESS THAN

See Also:
Constant Field Values

OPERATOR_GREATER_THAN

public static final int OPERATOR_GREATER_THAN
GREATER THAN

See Also:
Constant Field Values

OPERATOR_NOT_EQUALS

public static final int OPERATOR_NOT_EQUALS
NOT EQUALS

See Also:
Constant Field Values

OPERATOR_BEGINS_WITH

public static final int OPERATOR_BEGINS_WITH
BEGINS WITH

See Also:
Constant Field Values

OPERATOR_ENDS_WITH

public static final int OPERATOR_ENDS_WITH
ENDS WITH

See Also:
Constant Field Values

OPERATOR_CONTAINS

public static final int OPERATOR_CONTAINS
CONTAINS

See Also:
Constant Field Values

OPERATOR_GREATER_THAN_EQUALS

public static final int OPERATOR_GREATER_THAN_EQUALS
GREATER THAN EQUALS ( >=)

See Also:
Constant Field Values

OPERATOR_LESS_THAN_EQUALS

public static final int OPERATOR_LESS_THAN_EQUALS
LESS THAN EQUALS (<=)

See Also:
Constant Field Values
Constructor Detail

Query.Statement

public Query.Statement()

Query.Statement

public Query.Statement(int left_operand_constant,
                       int operator,
                       java.lang.String right_operand)
Constructor that uses all required components.

Parameters:
left_operand_constant - The left operand.
operator - The operator.
right_operand - The right operand.

Query.Statement

public Query.Statement(java.lang.String left_operand,
                       int operator,
                       java.lang.String right_operand)
Constructor that uses all required components.

Parameters:
left_operand - The left operand.
operator - The operator.
right_operand - The right operand.
Method Detail

attributeToString

public static java.lang.String attributeToString(int infomodelAttribute)
This method converts an attribute value to a String.

Parameters:
infomodelAttribute - The attribute to be converted.
Returns:
The String equivalent of the attribute.

setLeftOperandWithConstant

public void setLeftOperandWithConstant(int leftOperandConstant)
Sets the left operand and the namespace.

Parameters:
leftOperandConstant - The left operand.

getLeftOperand

public java.lang.String getLeftOperand()
Retrieves the left operand.

Returns:
The left operand.

setLeftOperand

public void setLeftOperand(java.lang.String leftOperand)
Sets the left operand. The left operand is the metadata name that this statement addresses.

Parameters:
leftOperand - The left operand.

setNamespace

public void setNamespace(java.lang.String namespace)
Sets the namespace of the left operand. The search will be constrained to this namespace if it is set.

Parameters:
namespace - The namespace.

getNamespace

public java.lang.String getNamespace()
Retrieves the namespace.

Returns:
The namespace.

getOperator

public int getOperator()
Retrieves the operator.

Returns:
The operator.

setOperator

public void setOperator(int operator)
Set the operator for this statement. Use the OPERATOR_* constants defined in this class.

Parameters:
operator - The operator.

getRightOperand

public java.lang.String getRightOperand()
Retrieves the right operand. The right operand contains the search criteria for this statement.

Returns:
The right operand.

setRightOperand

public void setRightOperand(java.lang.String rightOperand)
Sets the right operand. The right operand contains the search criteria for this statement.

Parameters:
rightOperand - The right operand.

toString

public java.lang.String toString()
Retrieves a String representation of this statement.

Overrides:
toString in class java.lang.Object
Returns:
A String representation of this statement.