public interface QueryCreateEvent
Server-answer to Query.create()
.
This event must be handled by
QueryListener.onQueryCreate()
.
Field Summary | |
---|---|
static int |
RESULT_BAD_PARAMETERS
Failure-code: bad parameter associated to the query. |
static int |
RESULT_WRONG_QUERY_ID
Failure-code: bad QueryID associated to the query. |
Fields inherited from interface Event |
---|
RESULT_GENERIC_ERROR, RESULT_OK |
Method Summary | |
---|---|
int |
getNumRows()
Returns the number of rows in the result-set as computed by the server. |
int |
getTimeToLive()
Returns the interval time (in seconds) during which the server cache the result-set. |
boolean |
resultSetFollows()
Returns the indication that the result-set is immediately available. |
Methods inherited from interface QueryEvent |
---|
getQuery |
Methods inherited from interface Event |
---|
getResult |
Field Detail |
---|
static final int RESULT_BAD_PARAMETERS
The server is not able to process the query with the given parameter.
static final int RESULT_WRONG_QUERY_ID
The server is not able to process the query with the given QueryID.
Method Detail |
---|
int getNumRows()
If the server does not known this number then -1 is returned: e.g. when
resultSetFollows()
returns false
.
This method must be called only when the result
is Event.RESULT_OK
.
Event.RESULT_OK
.int getTimeToLive()
During this interval the client may issue
Query.queryRows()
invocations to
obtains the various parts of the result-set.
The value returned is meaningfull only if resultSetFollows()
returns false
.
If the server does not known this interval then zero is returned: e.g.
when resultSetFollows()
returns true
.
This method must be called only when the result
is Event.RESULT_OK
.
resultSetFollows()
is true
, or
Event.RESULT_OK
.boolean resultSetFollows()
true
means that
QueryListener.onQueryNotify()
will be
automatically called N+1 times:
EOQ
indication
equals to false
) for each of the N rows in the
result-set;
EOQ
indication equals to true
) to indicate the end of the
result-set.
false
means that
QueryListener.onQueryNotify()
will
not be automatically called (as result of
Query.create()
) and the client must issue a specific
Query.queryRows()
to obtains a subset
of the result-set.
This method must be called only when the result
is Event.RESULT_OK
.
false
is returned when
result is not Event.RESULT_OK
.