|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.sdk.common.DKQExpr
A query expression is used to specify a simple query. It is an alternate form of a query string. It may have one or more sub-query expressions (DKQSubExpr). Each sub-query expression has a query term (DKQTerm), an option list, and a parameter list. The query term specifies the query conditions The option list specifies options relevant to the query. An example of an option in DL could be the maximum result limit of this query. The parameter list specifies parameters to be used by or bound to the query. The query language type indicates if it is parametric, text, or image query. You can combine two query expressions with logical operator AND to form a query expression tree. Logical operator OR is not supported yet. A DKQExpr can represents either a query expression or expression tree. An expression tree has positive opCode(), and non-null left() and right() subtree. A DKQExpr is singular if opCode() is negative, and left() and right() are null. Currently, the expression tree can only contains a maximum of one parametric, one text, and one image query .
Constructor Summary | |
DKQExpr()
Default constructor without a parameter. |
|
DKQExpr(DKQExpr lhs,
short logOpCode,
DKQExpr rhs)
Creates a query expression tree by applying a logical operator to a pair of query expressions. |
Method Summary | |
int |
addSubQuery(DKQSubExpr subQE)
Adds a sub-query to this expression. |
DKQExpr |
and(DKQExpr rhs)
Apply logical AND operator between this query expression and another one. |
java.lang.String |
getAssociatedEntityName()
Gets the associated entity name associated with this query This entity will support text and parametric query |
java.lang.String |
getAssociatedMapping()
Gets the associated mapping for this query expression. |
java.lang.String |
getDatastoreName()
Gets the target datastore name for executing this query. |
java.lang.String |
getDatastoreType()
Gets the target datastore type for executing this query. |
java.lang.String[] |
getEntityNames()
Gets the mapped entity names in this query expression. |
java.lang.String[] |
getMappingNames()
Gets the optional schema mapping names for executing this query. |
int[] |
getMappingTypes()
Gets the optional schema mapping types for executing this query. |
DKNVPair |
getOption(int position)
Gets an option at the given position. |
DKNVPair |
getOption(java.lang.String name)
Gets an option with a given name. |
DKNVPair[] |
getOptionList()
Gets the option list. |
DKNVPair |
getParameter(int position)
Gets a parameter at a given position. |
DKNVPair |
getParameter(java.lang.String name)
Gets a parameter with a given name. |
DKNVPair[] |
getParameterList()
Gets the parameter list. |
short |
getQLType()
Gets the query language type, which could be a parametric, text, image query, etc. |
DKQSubExpr |
getSubQuery(int position)
Gets the sub-query at the given position. |
boolean |
isLeaf()
Check if this expression is a leaf. |
boolean |
isTranslation()
Check if this query requires a translation using schema mapping. |
DKQExpr |
left()
Gets the query in left hand side. |
short |
opCode()
Gets the operator code in this expression tree. |
int |
optionCount()
Gets the number of defined options. |
DKQExpr |
or(DKQExpr rhs)
Apply logical OR operator between this query and another one. |
int |
parameterCount()
Gets the number of defined parameters. |
void |
removeOption(int position)
Removes the option at the given position. |
int |
removeOption(java.lang.String name)
Removes the option with the given name. |
void |
removeParameter(int position)
Removes the parameter at the given position. |
int |
removeParameter(java.lang.String name)
Removes the parameter with the given name. |
int |
removeSubQuery(DKQSubExpr subQE)
Removes a given sub-query form this expression. |
void |
removeSubQuery(int position)
Removes a sub-query at the given position form this expression. |
DKQExpr |
right()
Gets the query in right hand side. |
void |
setAssociatedMapping(java.lang.String associatedMapping)
Sets the associated mapping for this query expression. |
void |
setDatastoreName(java.lang.String dsName)
Sets the target datastore name for executing this query. |
void |
setDatastoreType(java.lang.String dsType)
Sets the target datastore type for executing this query. |
void |
setOption(int position,
DKNVPair optionPair)
Sets the option at the given position. |
int |
setOption(java.lang.String name,
java.lang.Object value)
Sets the option with the given name. |
void |
setOptionList(DKNVPair[] optionList)
Sets the option list. |
void |
setParameter(int position,
DKNVPair parmPair)
Sets the parameter at the given position. |
int |
setParameter(java.lang.String name,
java.lang.Object value)
Sets a parameter with a given name. |
void |
setParameterList(DKNVPair[] parameterList)
Sets the parameter list. |
void |
setQLType(short qlType)
Sets the query language type, which could be a parametric, text, image query, etc. |
int |
subQueryCount()
Gets the number of sub-queries in this expression. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DKQExpr()
public DKQExpr(DKQExpr lhs, short logOpCode, DKQExpr rhs)
lhs
- left querylogOpCode
- logical operator coderhs
- right queryMethod Detail |
public short getQLType()
public void setQLType(short qlType)
qlType
- the query language typepublic java.lang.String getDatastoreType()
public void setDatastoreType(java.lang.String dsType)
dsName
- target datastore typepublic java.lang.String getDatastoreName()
public void setDatastoreName(java.lang.String dsName)
dsName
- target datastore namepublic boolean isTranslation()
public java.lang.String[] getMappingNames()
public int[] getMappingTypes()
public java.lang.String getAssociatedMapping()
public void setAssociatedMapping(java.lang.String associatedMapping)
the
- associated mappingpublic java.lang.String[] getEntityNames()
public java.lang.String getAssociatedEntityName()
public int subQueryCount()
public int addSubQuery(DKQSubExpr subQE)
public int removeSubQuery(DKQSubExpr subQE)
public void removeSubQuery(int position)
public DKQSubExpr getSubQuery(int position)
public int optionCount()
public DKNVPair[] getOptionList()
public void setOptionList(DKNVPair[] optionList)
an
- NVPair array of options.public DKNVPair getOption(int position)
java.lang.IndexOutOfBoundsException
- if position is invalid.public DKNVPair getOption(java.lang.String name)
public void setOption(int position, DKNVPair optionPair)
optionPair
- the new optionjava.lang.IndexOutOfBoundsException
- if position is invalid.public int setOption(java.lang.String name, java.lang.Object value)
public void removeOption(int position)
the
- position.java.lang.IndexOutOfBoundsException
- if position is invalid.public int removeOption(java.lang.String name)
name
- the option name.java.lang.IndexOutOfBoundsException
- if position is invalid.public int parameterCount()
public DKNVPair[] getParameterList()
public void setParameterList(DKNVPair[] parameterList)
an
- NVPair array of parameters.public DKNVPair getParameter(int position)
java.lang.IndexOutOfBoundsException
- if position is invalid.public DKNVPair getParameter(java.lang.String name)
public void setParameter(int position, DKNVPair parmPair)
parmPair
- the new parameterjava.lang.IndexOutOfBoundsException
- if position is invalid.public int setParameter(java.lang.String name, java.lang.Object value)
public void removeParameter(int position)
the
- position.java.lang.IndexOutOfBoundsException
- if position is invalid.public int removeParameter(java.lang.String name)
name
- the parameter name.java.lang.IndexOutOfBoundsException
- if position is invalid.public short opCode()
public DKQExpr left()
public DKQExpr right()
public boolean isLeaf()
public DKQExpr and(DKQExpr rhs)
rhs
- the query to be AND-ed at the right hand sidepublic DKQExpr or(DKQExpr rhs)
rhs
- the query to be OR-ed at the right hand side
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |