net.esper.eql.expression
Class StreamTypeServiceImpl

java.lang.Object
  extended by net.esper.eql.expression.StreamTypeServiceImpl
All Implemented Interfaces:
StreamTypeService

public class StreamTypeServiceImpl
extends Object
implements StreamTypeService

Implementation that provides stream number and property type information.


Constructor Summary
StreamTypeServiceImpl(EventType[] eventTypes, String[] streamNames)
          Ctor.
 
Method Summary
 EventType[] getEventTypes()
          Returns an array of event types for each event stream in the order declared.
 String[] getStreamNames()
          Returns an array of event stream names in the order declared.
 PropertyResolutionDescriptor resolveByPropertyName(String propertyName)
          Returns the offset of the stream and the type of the property for the given property name, by looking through the types offered and matching up.
 PropertyResolutionDescriptor resolveByStreamAndPropName(String streamName, String propertyName)
          Returns the offset of the stream and the type of the property for the given property name, by using the specified stream name to resolve the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamTypeServiceImpl

public StreamTypeServiceImpl(EventType[] eventTypes,
                             String[] streamNames)
Ctor.

Parameters:
eventTypes - - array of event types, one for each stream
streamNames - - array of stream names, one for each stream
Method Detail

getEventTypes

public EventType[] getEventTypes()
Description copied from interface: StreamTypeService
Returns an array of event types for each event stream in the order declared.

Specified by:
getEventTypes in interface StreamTypeService
Returns:
event types

getStreamNames

public String[] getStreamNames()
Description copied from interface: StreamTypeService
Returns an array of event stream names in the order declared.

Specified by:
getStreamNames in interface StreamTypeService
Returns:
stream names

resolveByPropertyName

public PropertyResolutionDescriptor resolveByPropertyName(String propertyName)
                                                   throws DuplicatePropertyException,
                                                          PropertyNotFoundException
Description copied from interface: StreamTypeService
Returns the offset of the stream and the type of the property for the given property name, by looking through the types offered and matching up.

Specified by:
resolveByPropertyName in interface StreamTypeService
Parameters:
propertyName - - property name in event
Returns:
descriptor with stream number, property type and property name
Throws:
DuplicatePropertyException - to indicate property was found twice
PropertyNotFoundException - to indicate property could not be resolved

resolveByStreamAndPropName

public PropertyResolutionDescriptor resolveByStreamAndPropName(String streamName,
                                                               String propertyName)
                                                        throws PropertyNotFoundException,
                                                               StreamNotFoundException
Description copied from interface: StreamTypeService
Returns the offset of the stream and the type of the property for the given property name, by using the specified stream name to resolve the property.

Specified by:
resolveByStreamAndPropName in interface StreamTypeService
Parameters:
streamName - - name of stream
propertyName - - property name in event
Returns:
descriptor with stream number, property type and property name
Throws:
PropertyNotFoundException - to indicate property could not be resolved
StreamNotFoundException - to indicate stream name could not be resolved