Class EnumLiteral

    • Constructor Detail

      • EnumLiteral

        public EnumLiteral​(java.lang.String value)
        Construct enum literal for given string value. The string value has to contain the full class name of the enumeration including the name of the constant separated by dot. If an enum constant can not be found an IllegalArgumentException will be thrown.
        Parameters:
        value - String value with full name of the enum constant.
      • EnumLiteral

        public EnumLiteral​(java.lang.Enum<?> value)
        Construct enum literal for given enum constant.
        Parameters:
        value - Enum constant to represent by the enum literal.
    • Method Detail

      • getValue

        public java.lang.Enum<?> getValue()
        Get enum constant represented by this enum literal.
        Returns:
        Enum constant represented by this enum literal.
      • toString

        public java.lang.StringBuilder toString​(java.lang.StringBuilder sb)
        Append a string representation of the object to the given StringBuilder. In general, the toString method for query objects appends a string that textually represents this object. The result should be a query string that complies to EJB QL specification as long as the query object represents a syntay element of it. It is required that all subclasses override this method. The toString method defined at class Object is overwritten and calls this method.
        Parameters:
        sb - StringBuilder to append the string representation of this object to.
        Returns:
        Same instance of StringBuilder given as parameter.