Enum DataTypeClass

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DataTypeClass>

    public enum DataTypeClass
    extends java.lang.Enum<DataTypeClass>
    Represents a "category" of data type, since often in SQLTags we do this based on a broad category- int, float, string or date.

    DataSet is included since the type is defined in DataType, though it is not currently used in SQLTags.

    • Method Detail

      • values

        public static DataTypeClass[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DataTypeClass c : DataTypeClass.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DataTypeClass valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getIntValue

        public int getIntValue()
        Returns the type code for this AlertMode
      • isNumeric

        public boolean isNumeric()
      • getTypeForValue

        public static DataTypeClass getTypeForValue​(int val)
        Returns the AlertMode for the given type code. Returns null if there is node defined mode for the given code
      • getJavaType

        public java.lang.Class<?> getJavaType()
        Gets the java type that would be able to hold a value of this class.
      • getDataType

        public DataType getDataType()
        Returns a datatype capable of handling this type class.
      • getCompatibleType

        public DataTypeClass getCompatibleType​(DataTypeClass in)
        Compares the two data type classes and returns the most compatible type