it.list.jft.event
Interface QueryListener

All Superinterfaces:
Listener

public interface QueryListener
extends Listener

Interface to be implemented in order to handle the Query Lifecycle.

This interface is bound to queries created by Context.makeQuery().
It may be retrieved by CommunicationLifeCycle.getListener().


Method Summary
 void onQueryCreate(QueryCreateEvent event)
          Called when the server-answer to the Query.create() is available.
 void onQueryDestroy(QueryDestroyEvent event)
          Called when the server-answer to the Query.destroy() is available.
 void onQueryNotify(QueryNotifyEvent event)
          Called when an entity of a query result-set is available.
 void onQueryRows(QueryRowsEvent event)
          Called when the server-answer to the Query.queryRows() is available.
 

Method Detail

onQueryCreate

void onQueryCreate(QueryCreateEvent event)
Called when the server-answer to the Query.create() is available.

If the server result is Event.RESULT_OK,
then

otherwise

In the latter case it is a good practice to release the query associated to the event parameter.

Parameters:
event - the server-answer to the Query.create()

onQueryRows

void onQueryRows(QueryRowsEvent event)
Called when the server-answer to the Query.queryRows() is available.

If the server result is Event.RESULT_OK,
then

otherwise

In both cases the query status remains Query.STATUS_CREATED.

Parameters:
event - the server-answer to the Query.queryRows()

onQueryNotify

void onQueryNotify(QueryNotifyEvent event)
Called when an entity of a query result-set is available.

If the query result-set computed by the server, as an aswer to a correct Query.create() or Query.queryRows(), is composed by N entities then this method will be invoked (N+1) times: N times with each of the N entities and one more time with the EOQ indication.

In any case:

Parameters:
event - event containing an entity of the query result-set or the EOQ indication.

onQueryDestroy

void onQueryDestroy(QueryDestroyEvent event)
Called when the server-answer to the Query.destroy() is available.

If the server result is Event.RESULT_OK, then the server has destroyed the query otherwise some unknow error occured.

In both cases:

Parameters:
event - the server-answer to the Query.destroy()


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