Package org.eso.ias.types
Enum Class IASTypes
- All Implemented Interfaces:
Serializable
,Comparable<IASTypes>
,Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertStringToObject
(String value) Parse the passed string java objectstatic Object
convertStringToObject
(String value, IASTypes valueType) Parse the passed string of the given type into a java objectstatic IASTypes
fromIasioDaoType
(IasTypeDao typeDao) Build a IASTypes from the DAO definitionstatic IASTypes
Returns the enum constant of this class with the specified name.static IASTypes[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LONG
-
INT
-
SHORT
-
BYTE
-
DOUBLE
-
FLOAT
-
BOOLEAN
-
CHAR
-
STRING
-
TIMESTAMP
-
ARRAYOFDOUBLES
-
ARRAYOFLONGS
-
ALARM
-
-
Field Details
-
typeClass
-
typeName
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
toIasTypeDao
-
fromIasioDaoType
Build a IASTypes from the DAO definition- Parameters:
typeDao
- the IasTypeDao- Returns:
- the related IASTypes for the passed type DAO
-
convertStringToObject
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
Parse the passed string of the given type into a java object- Parameters:
value
- the string representation of the valuevalueType
- the type of the value- Returns:
- the java object for the give value and type
-