it.list.jft.event
Interface QueryCreateEvent

All Superinterfaces:
Event, QueryEvent

public interface QueryCreateEvent
extends QueryEvent

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

RESULT_BAD_PARAMETERS

static final int RESULT_BAD_PARAMETERS
Failure-code: bad parameter associated to the query.

The server is not able to process the query with the given parameter.

See Also:
Constant Field Values

RESULT_WRONG_QUERY_ID

static final int RESULT_WRONG_QUERY_ID
Failure-code: bad QueryID associated to the query.

The server is not able to process the query with the given QueryID.

See Also:
Constant Field Values
Method Detail

getNumRows

int getNumRows()
Returns the number of rows in the result-set as computed by the server.

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.

Returns:
number of rows in the result-set: N >= 0 means that the result-set contains N elements.
-1 is returned when the server is unable to compute this number, or
when the result is not Event.RESULT_OK.

getTimeToLive

int getTimeToLive()
Returns the interval time (in seconds) during which the server cache the result-set.

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.

Returns:
number of seconds during which the server cache the result-set.
Zero is returned when the interval is not known, or
when the resultSetFollows() is true, or
when the result is not Event.RESULT_OK.

resultSetFollows

boolean resultSetFollows()
Returns the indication that the result-set is immediately available.

true means that QueryListener.onQueryNotify() will be automatically called N+1 times:

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.

Returns:
indication regarding the immediate availability of the result-set.
false is returned when result is not Event.RESULT_OK.


Submit a bug or feature to FT\API Programming Support<\font>