it.list.jft.event
Interface QueryNotifyEvent

All Superinterfaces:
Event, QueryEvent

public interface QueryNotifyEvent
extends QueryEvent

Event generated when a single entity (or the EOQ indication) of a query result-set is available.

This event must be handled by QueryListener.onQueryNotify().

With this event the server result is always Event.RESULT_OK.


Field Summary
static int ACTION_ENTITY_ADD
          Action-code: entity is on the server.
static int ACTION_ENTITY_DEL
          Action-code: entity logically removed on the server.
 
Fields inherited from interface Event
RESULT_GENERIC_ERROR, RESULT_OK
 
Method Summary
 int getAction()
          Returns the server action associated with the entity available on this event.
 Entity getEntity()
          Returns the entity of the current row in the result-set.
 boolean getEOQ()
          Returns the indication that the result-set is ended.
 int getRowNumber()
          Returns the index (1-based) of the current row in the result-set.
 TimeStamp getTimeStamp()
          Returns the entity timestamp.
 
Methods inherited from interface QueryEvent
getQuery
 
Methods inherited from interface Event
getResult
 

Field Detail

ACTION_ENTITY_ADD

static final int ACTION_ENTITY_ADD
Action-code: entity is on the server.

This value may be returned by getAction().

See Also:
Constant Field Values

ACTION_ENTITY_DEL

static final int ACTION_ENTITY_DEL
Action-code: entity logically removed on the server.

This value may be returned by getAction().

See Also:
Constant Field Values
Method Detail

getRowNumber

int getRowNumber()
Returns the index (1-based) of the current row in the result-set.

The index of the first row of a result-set returned by Query.create() is 1.
The index of the first row of a result-set returned by Query.queryRows() is firstRow.

This method must be called only when the EOQ indication is false.

Returns:
the index (1-based) of the current row in the result-set.
Zero is returned when the EOQ indication is true
or when the information is not available (some primitives FastTrack services always return zero for every rows of the returned result-set).

getTimeStamp

TimeStamp getTimeStamp()
Returns the entity timestamp.

This method must be called only when the EOQ indication is false.

Returns:
the entity timestamp.
null is returned when the EOQ indication is true or if entity timestamp is not sent by the server.

getEntity

Entity getEntity()
Returns the entity of the current row in the result-set.

This method must be called only when the EOQ indication is false.

Returns:
the entity of the current row in the result-set.
null is returned when the EOQ indication is true.

getAction

int getAction()
Returns the server action associated with the entity available on this event.

The possible returned values are described in the Field Summary section.

Returns:
the server action associated with the entity available on this event if the Entity is not null.

getEOQ

boolean getEOQ()
Returns the indication that the result-set is ended.

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 the QueryListener.onQueryNotify() method (with a QueryNotifyEvent as parameter) will be invoked N+1 times: N times with each of the N entities (and this EOQ indication equals to false) and one more time with this EOQ indication equals to true.

Returns:
the indication that the result-set is ended.


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