Enum Class IASTypes

java.lang.Object
java.lang.Enum<IASTypes>
org.eso.ias.types.IASTypes
All Implemented Interfaces:
Serializable, Comparable<IASTypes>, Constable

public enum IASTypes extends Enum<IASTypes>
Java representation of the IAS types. In this case it is better to have java enumerations instead of scala because the two differ too much up to the point that scala Enumeration are not usable within java sources (true before scala 3). TODO: avoid duplication with org.eso.ias.cdb.pojos.IasTypeDao (Issue #17)
Author:
acaproni
See Also:
  • Enum Constant Details

    • LONG

      public static final IASTypes LONG
    • INT

      public static final IASTypes INT
    • SHORT

      public static final IASTypes SHORT
    • BYTE

      public static final IASTypes BYTE
    • DOUBLE

      public static final IASTypes DOUBLE
    • FLOAT

      public static final IASTypes FLOAT
    • BOOLEAN

      public static final IASTypes BOOLEAN
    • CHAR

      public static final IASTypes CHAR
    • STRING

      public static final IASTypes STRING
    • TIMESTAMP

      public static final IASTypes TIMESTAMP
    • ARRAYOFDOUBLES

      public static final IASTypes ARRAYOFDOUBLES
    • ARRAYOFLONGS

      public static final IASTypes ARRAYOFLONGS
    • ALARM

      public static final IASTypes ALARM
  • Field Details

    • typeClass

      public final Class<?> typeClass
    • typeName

      public final String typeName
  • Method Details

    • values

      public static IASTypes[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IASTypes valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toIasTypeDao

      public IasTypeDao toIasTypeDao()
    • fromIasioDaoType

      public static IASTypes fromIasioDaoType(IasTypeDao typeDao)
      Build a IASTypes from the DAO definition
      Parameters:
      typeDao - the IasTypeDao
      Returns:
      the related IASTypes for the passed type DAO
    • convertStringToObject

      public Object convertStringToObject(String value)
      Parse the passed string java object
      Parameters:
      value - the string representation of the value
      Returns:
      the java object for the give value and type
    • convertStringToObject

      public static Object convertStringToObject(String value, IASTypes valueType)
      Parse the passed string of the given type into a java object
      Parameters:
      value - the string representation of the value
      valueType - the type of the value
      Returns:
      the java object for the give value and type