com.apama.event.parser
Class FieldTypes

java.lang.Object
  extended by com.apama.event.parser.FieldTypes

public final class FieldTypes
extends java.lang.Object

Provides factory methods and constants for getting all supported Apama event field types.

For example, to use this class to create a field object whose type is an Apama sequence of integers:

Field<Long> myField = FieldTypes.sequence(FieldTypes.INTEGER).newField("myField");


Field Summary
static FieldType<java.lang.Boolean> BOOLEAN
          Get the singleton field type object for the Apama boolean type, for which values are specified as Java Boolean objects.
static FieldType<DecimalFieldValue> DECIMAL
          Get the singleton field type object for the Apama decimal type, for which values are specified as Java DecimalFieldValue objects.
static FieldType<java.lang.Double> FLOAT
          Get the singleton field type object for the Apama float type, for which values are specified as Java Double objects.
static FieldType<java.lang.Long> INTEGER
          Get the singleton field type object for the Apama integer type, for which values are specified as Java Long objects.
static FieldType<LocationType> LOCATION
          Get the singleton field type object for the Apama location type, for which values are specified as Java LocationType objects.
static FieldType<java.lang.String> STRING
          Get the singleton field type object for the Apama string type, for which values are specified as Java String objects.
 
Method Summary
static
<K,V> DictionaryFieldType<K,V>
dictionary(FieldType<K> keyType, FieldType<V> valueType)
          Create a new field type object for an Apama dictionary event field, for which values are specified by objects implementing java.util.Map<K,V>.
static
<E> SequenceFieldType<E>
sequence(FieldType<E> elementType)
          Create a new field type object for an Apama sequence event field, for which values are specified by objects implementing java.util.List<E>.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN

public static final FieldType<java.lang.Boolean> BOOLEAN
Get the singleton field type object for the Apama boolean type, for which values are specified as Java Boolean objects.


DECIMAL

public static final FieldType<DecimalFieldValue> DECIMAL
Get the singleton field type object for the Apama decimal type, for which values are specified as Java DecimalFieldValue objects.


FLOAT

public static final FieldType<java.lang.Double> FLOAT
Get the singleton field type object for the Apama float type, for which values are specified as Java Double objects.


INTEGER

public static final FieldType<java.lang.Long> INTEGER
Get the singleton field type object for the Apama integer type, for which values are specified as Java Long objects.


LOCATION

public static final FieldType<LocationType> LOCATION
Get the singleton field type object for the Apama location type, for which values are specified as Java LocationType objects.


STRING

public static final FieldType<java.lang.String> STRING
Get the singleton field type object for the Apama string type, for which values are specified as Java String objects.

Method Detail

sequence

public static <E> SequenceFieldType<E> sequence(FieldType<E> elementType)
Create a new field type object for an Apama sequence event field, for which values are specified by objects implementing java.util.List<E>.

Parameters:
elementType - The event field type for the elements in this sequence.
Returns:
A new object representing this field type, which can be used in the constructor to EventType.

dictionary

public static <K,V> DictionaryFieldType<K,V> dictionary(FieldType<K> keyType,
                                                        FieldType<V> valueType)
Create a new field type object for an Apama dictionary event field, for which values are specified by objects implementing java.util.Map<K,V>.

Parameters:
keyType - The event field type for the keys of items in this dictionary.
valueType - The event field type for the values of items in this dictionary.
Returns:
A new object representing this field type, which can be used in the constructor to EventType.


Submit a bug or feature
Copyright (c) 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG