org.ow2.wildcat.hierarchy.attribute
Class QueryAttribute

java.lang.Object
  extended by org.ow2.wildcat.hierarchy.attribute.QueryAttribute
All Implemented Interfaces:
com.espertech.esper.client.UpdateListener, Attribute, Mountable

public class QueryAttribute
extends Object
implements Attribute, com.espertech.esper.client.UpdateListener

An attribute holding the result of a query.


Constructor Summary
QueryAttribute(String queryString)
          Construct a new query attribute whose generated events have the global scope.
QueryAttribute(String queryString, WEventInterface.Scope scope)
          Construct a new query attribute.
 
Method Summary
protected  Context getContext()
           
protected  Path getPath()
           
protected  WEventInterface.Scope getScope()
           
 Object getValue()
           
 boolean isMount()
           
 void mount(Context context, Path mountPoint)
          Mount the Mountable.
 Object setValue(Object value)
          Set attribute's value.
 void unMount()
          Unmount the Mountable.
 void update(com.espertech.esper.client.EventBean[] newEvents, com.espertech.esper.client.EventBean[] oldEvents)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryAttribute

public QueryAttribute(String queryString)
Construct a new query attribute whose generated events have the global scope.

Parameters:
queryString - the associated query

QueryAttribute

public QueryAttribute(String queryString,
                      WEventInterface.Scope scope)
Construct a new query attribute.

Parameters:
queryString - the associated query
scope - the scope of generated events
Method Detail

getValue

public Object getValue()
Specified by:
getValue in interface Attribute
Returns:
attribute's value

setValue

public Object setValue(Object value)
Description copied from interface: Attribute
Set attribute's value.

Specified by:
setValue in interface Attribute
Parameters:
value - the new value
Returns:
the old value

getScope

protected WEventInterface.Scope getScope()
Returns:
the scope of generated events

getContext

protected Context getContext()
Returns:
the context where is mount this attribute

getPath

protected Path getPath()
Returns:
the path of this attribute

isMount

public boolean isMount()
Specified by:
isMount in interface Mountable
Returns:
true if is mount, false else.

mount

public void mount(Context context,
                  Path mountPoint)
Description copied from interface: Mountable
Mount the Mountable.

Specified by:
mount in interface Mountable
Parameters:
context - the context the Mountable is attached
mountPoint - the path to mount it

unMount

public void unMount()
Description copied from interface: Mountable
Unmount the Mountable.

Specified by:
unMount in interface Mountable

update

public void update(com.espertech.esper.client.EventBean[] newEvents,
                   com.espertech.esper.client.EventBean[] oldEvents)
Specified by:
update in interface com.espertech.esper.client.UpdateListener


Copyright © 2010 OW2 Consortium. All Rights Reserved.