|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is a way to deal with SDAI queries.
The query first has to be created from SdaiSession
.
The parameters of a query can be set using setParameter
.
The query can be then execute
d. Prior to execution
Query source and domain can be set. Alternatively they can be supplied
in execute
method. Domain is used to override the
domain defined in QuerySource
(see QuerySource.getQuerySourceDomain()
).
If query source nor domain are defined the query is executed on a predefined
query source which is implementation specific. The preferred way to get
the results is getResultSet
.
SdaiSession.newQuery(org.w3c.dom.Document)
,
SdaiSession.newQuery(org.w3c.dom.Element)
Method Summary | |
void |
execute()
Executes this query on a default or predefined query source. |
void |
execute(QuerySource qs)
Executes this query on the supplied query source. |
void |
execute(QuerySource qs,
ASdaiModel domain)
Executes this query on the supplied query source and domain. |
AEntity |
getResult(int index)
Deprecated. This method does not support <items>
constraint. For queries V1.1 the preferred way is to use
getResultSet(int) . |
AEntity |
getResult(java.lang.String name)
Deprecated. This method does not support <items>
constraint. For queries V1.1 the preferred way is to use
getResultSet(String) . |
java.lang.String[] |
getResultNames()
Returns all result names. |
QueryResultSet |
getResultSet(int index)
Returns result set by index. |
QueryResultSet |
getResultSet(java.lang.String name)
Returns result set by name. |
void |
setDomain(ASdaiModel domain)
Sets a query domain. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets the parameter of this query. |
void |
setQuerySource(QuerySource qs)
Sets the default query source to be later used be execute() method. |
Method Detail |
public void setQuerySource(QuerySource qs) throws SdaiException
execute()
method.
qs
- The QuerySource
to set
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic void setDomain(ASdaiModel domain) throws SdaiException
QuerySource
.
domain
- The domain to set
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic void execute() throws SdaiException
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic void execute(QuerySource qs) throws SdaiException
qs
- The QuerySource
to execute this query on
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic void execute(QuerySource qs, ASdaiModel domain) throws SdaiException
qs
- The QuerySource
to execute this query ondomain
- The domain which overrides query source domain
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic AEntity getResult(java.lang.String name) throws SdaiException
<items>
constraint. For queries V1.1 the preferred way is to use
getResultSet(String)
.
AEntity
. The query has to be
executed before the result can be obtained.
name
- The name of the result. All result names can be obtained
from getResultNames()
AEntity
containing entity instances of this result
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic AEntity getResult(int index) throws SdaiException
<items>
constraint. For queries V1.1 the preferred way is to use
getResultSet(int)
.
AEntity
. The query has to be
executed before the result can be obtained.
index
- The 1 based index of the result. The number of the results
is the size of the array returned by getResultNames()
AEntity
containing entity instances of this result
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic QueryResultSet getResultSet(java.lang.String name) throws SdaiException
name
- The name of the result. All result names can be obtained
from getResultNames()
QueryResultSet
containing the result values
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic QueryResultSet getResultSet(int index) throws SdaiException
index
- The 1 based index of the result. The number of the results
is the size of the array returned by getResultNames()
QueryResultSet
containing the result values
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic java.lang.String[] getResultNames() throws SdaiException
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic void setParameter(java.lang.String name, java.lang.Object value) throws SdaiException
name
- The name of the parametervalue
- The value of the parameter
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operations
|
Copyright © LKSoftWare GmbH, 1999-2008 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |