|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.websphere.query.base.Value
public class Value
The Value class represents a general value in the query framework.
This class contains a value string and data type to describe a value in a query. For example, an integer value "30" will be constructed as value string = "30", and data type = Constants.DATATYPE_INTEGER, while a string value "Smith" may be constructed as value string = "Smith", and data type = Constants.DATATYPE_CHAR.
This class also provides the ability to specify a property name if this value is associated with a property. This is useful when the data type cannot be determined by the query builder. In this case, the property name is a hint of what property this value will be matched against.
Constructor Summary | |
---|---|
Value()
Creates a new Value instance, default constructor. |
|
Value(IValue value)
Creates a new Value instance as a copy of the original value. |
|
Value(java.lang.String newValueString)
Creates a new Value instance with the given value string. |
|
Value(java.lang.String newValueString,
int newDataType)
Creates a new Value instance with the given value string and data type. |
|
Value(java.lang.String newValueString,
int newDataType,
java.lang.String newPropertyName)
Creates a new Value instance with the given value string and property name. |
|
Value(java.lang.String newValueString,
java.lang.String newPropertyName)
Creates a new Value instance with the given value string and property name. |
Method Summary | |
---|---|
java.lang.String |
buildString(ISelectQueryCallback builder)
Builds a query string for the value. |
void |
buildString(ISelectQueryCallback builder,
java.lang.StringBuffer sb)
|
boolean |
equals(java.lang.Object o)
Tests for equality with the given object. |
int |
getDataType()
Returns the data type. |
java.lang.String |
getPropertyName()
Returns the property name |
java.lang.String |
getValueString()
Returns the value string. |
int |
hashCode()
Computes a hash code for the value. |
void |
setDataType(int newDataType)
Sets the data type of the value. |
void |
setPropertyName(java.lang.String newPropertyName)
Sets the name of the property this value is associated with. |
void |
setValueString(java.lang.String newValueString)
Sets the value string of the value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Value()
public Value(java.lang.String newValueString)
public Value(java.lang.String newValueString, int newDataType)
public Value(java.lang.String newValueString, java.lang.String newPropertyName)
public Value(java.lang.String newValueString, int newDataType, java.lang.String newPropertyName)
public Value(IValue value)
Method Detail |
---|
public java.lang.String buildString(ISelectQueryCallback builder) throws QueryException
buildString
in interface IStringBuilder
QueryException
public void buildString(ISelectQueryCallback builder, java.lang.StringBuffer sb) throws QueryException
buildString
in interface IStringBuilder
QueryException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int getDataType()
getDataType
in interface IFunctionElement
getDataType
in interface ILeftOperand
public java.lang.String getValueString()
getValueString
in interface IValue
public java.lang.String getPropertyName()
getPropertyName
in interface IValue
public int hashCode()
hashCode
in class java.lang.Object
public void setDataType(int newDataType)
public void setValueString(java.lang.String newValueString)
public void setPropertyName(java.lang.String newPropertyName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |