public class QueryListenerWrapper extends Object implements QueryListener, Query
Constructor and Description |
---|
QueryListenerWrapper(com.streambase.liveview.client.internal.ws.LiveViewMultiConnectionImpl liveViewMultiConnectionImpl,
QueryConfig config,
QueryListener qListener) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the client and server resources associated with this Query.
|
void |
deleteBegin(BeginDeleteEvent event)
Event to indicate the start of delete query.
|
void |
deleteEnd(EndDeleteEvent event)
Event to indicate the delete query is complete.
|
void |
exceptionRaised(QueryExceptionEvent event)
Event when an exception occurs during the query.
|
QueryConfig |
getConfig() |
List<Schema.Field> |
getFields()
Returns a list describing the fields of the tuples that will be returned by this Query.
|
List<Schema.Field> |
getKeyFields()
Returns a list of fields describing the primary key for this table.
|
short |
getQueryId()
This will match the queryId on the events.
|
Query |
getRealQuery() |
Schema |
getSchema() |
boolean |
isOpen()
If this is false, either you've already gotten a QueryClosed event or you're about to get one.
|
void |
queryClosed(QueryClosedEvent event)
Event when a query being listened to is closed.
|
void |
setRealQuery(Query realQuery) |
void |
setSchema(Schema schema) |
void |
snapshotBegin(BeginSnapshotEvent event)
Event to indicate the start of the result snapshot.
|
void |
snapshotEnd(EndSnapshotEvent event)
Event to indicate the query snapshot is complete.
|
void |
tupleAdded(TupleAddedEvent event)
Event when a new tuple is added to the result.
|
void |
tupleRemoved(TupleRemovedEvent event)
Event when an existing tuple is removed from the result.
|
void |
tupleUpdated(TupleUpdatedEvent event)
Event when an existing tuple in the result is updated.
|
public QueryListenerWrapper(com.streambase.liveview.client.internal.ws.LiveViewMultiConnectionImpl liveViewMultiConnectionImpl, QueryConfig config, QueryListener qListener)
config
- qListener
- liveViewMultiConnectionImpl
- public QueryConfig getConfig()
public void tupleAdded(TupleAddedEvent event)
QueryListener
tupleAdded
in interface QueryListener
event
- add eventpublic void tupleUpdated(TupleUpdatedEvent event)
QueryListener
tupleUpdated
in interface QueryListener
event
- update eventpublic void tupleRemoved(TupleRemovedEvent event)
QueryListener
tupleRemoved
in interface QueryListener
event
- remove eventpublic void snapshotBegin(BeginSnapshotEvent event)
QueryListener
snapshotBegin
in interface QueryListener
event
- snapshot beginpublic void snapshotEnd(EndSnapshotEvent event)
QueryListener
snapshotEnd
in interface QueryListener
event
- snapshot endpublic void deleteBegin(BeginDeleteEvent event)
QueryListener
deleteBegin
in interface QueryListener
event
- delete beginpublic void deleteEnd(EndDeleteEvent event)
QueryListener
deleteEnd
in interface QueryListener
event
- delete endpublic void exceptionRaised(QueryExceptionEvent event)
QueryListener
exceptionRaised
in interface QueryListener
event
- exception eventpublic void queryClosed(QueryClosedEvent event)
QueryListener
queryClosed
in interface QueryListener
event
- query closed eventpublic List<Schema.Field> getFields()
Query
public List<Schema.Field> getKeyFields()
Query
getKeyFields
in interface Query
public void close()
Query
public boolean isOpen()
Query
public short getQueryId()
Query
getQueryId
in interface Query
public Query getRealQuery()
public void setRealQuery(Query realQuery)
realQuery
- the realQuery to setpublic Schema getSchema()
public void setSchema(Schema schema)
schema
- the schema to set