Package com.apama.event.parser
Class FieldTypes
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description static FieldType<java.lang.Boolean>
BOOLEAN
Get the singleton field type object for the Apama boolean type, for which values are specified as JavaBoolean
objects.static FieldType<DecimalFieldValue>
DECIMAL
Get the singleton field type object for the Apama decimal type, for which values are specified as JavaDecimalFieldValue
objects.static FieldType<java.lang.Double>
FLOAT
Get the singleton field type object for the Apama float type, for which values are specified as JavaDouble
objects.static FieldType<java.lang.Long>
INTEGER
Get the singleton field type object for the Apama integer type, for which values are specified as JavaLong
objects.static FieldType<LocationType>
LOCATION
Get the singleton field type object for the Apama location type, for which values are specified as JavaLocationType
objects.static FieldType<java.lang.String>
STRING
Get the singleton field type object for the Apama string type, for which values are specified as JavaString
objects.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 implementingjava.util.Map<K,V>
.static <T> OptionalFieldType<T>
optional(FieldType<T> containedType)
Create a new field type object for an Apama optional event field, for which type is specified by the FieldTypecontainedType argument. 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 implementingjava.util.List<E>
.
-
-
-
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 JavaBoolean
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 JavaDecimalFieldValue
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 JavaDouble
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 JavaLong
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 JavaLocationType
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 JavaString
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 implementingjava.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 implementingjava.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
.
-
optional
public static <T> OptionalFieldType<T> optional(FieldType<T> containedType)
Create a new field type object for an Apama optional event field, for which type is specified by the FieldTypecontainedType argument. - Parameters:
elementType
- The event field type for the element in this optional type.- Returns:
- A new object representing this field type, which can be used in the constructor to
EventType
.
-
-