Class 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 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

      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 implementing java.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 FieldType containedType 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 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.
      • 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.
      • 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 FieldType containedType 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.