Class PromptValue

java.lang.Object
com.inet.viewer.PromptValue
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
RangePromptValue

@JsonData public abstract class PromptValue extends Object implements Serializable
Abstract super class of a prompt value
Since:
9.2
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Format
    formatter to use for dates (will use multiple fall backs)
    static final Format
    formatter to use for datetimes with 4-digit years but without showing seconds
    static final Format
    formatter to use for datetimes with 4-digit years and seconds
    static final Format
    formatter to use for datetimes (will use multiple fall backs)
    formatter to use for numbers
    needed for format with english decimal points
    static final Format
    formatter to use for times (will use multiple fall backs)
  • Constructor Summary

    Constructors
    Constructor
    Description
    PromptValue(int type)
    Creates a prompt values of the given type initialized with the default value of its type
    PromptValue(String description, int type)
    Creates a prompt values of the given type initialized with the default value of its type
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the description of the parameter field that has been set using API or i-net Designer dialog.
    abstract Object
    this method returns the value of this promptvalue using an SQL compatible type.
    abstract String
    Returns a string representation of the value of this prompt.
    int
    Get value type of the prompt, see the value type constants in PromptData
    abstract Object
    Returns the value of this prompt - its type will depend on which value type this PromptValue has: String for STRING
    Double for NUMBER and CURRENCY
    Boolean for BOOLEAN
    Date for DATE and DATETIME
    Time for TIME
    byte[] for BINARY
    boolean
    If true only the description will be displayed in the report dialog.
    void
    setDescription(String description)
    Set the description of the parameter field that can be used with API or in the prompt request dialog.
    void
    setOnlyDescription(boolean onlyDescription)
    Sets the appearance of this value in the prompt dialog.
    Creates a formated string representation of this prompt value with its decription and value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • NUMBERFORMAT

      public static NumberFormat NUMBERFORMAT
      formatter to use for numbers
    • NUMBERFORMAT_ENGLISH

      public static NumberFormat NUMBERFORMAT_ENGLISH
      needed for format with english decimal points
    • DATEFORMAT

      public static final Format DATEFORMAT
      formatter to use for dates (will use multiple fall backs)
    • DATETIME_FOUR_DIGIT_YEAR_WITH_SECONDS

      public static final Format DATETIME_FOUR_DIGIT_YEAR_WITH_SECONDS
      formatter to use for datetimes with 4-digit years and seconds
    • DATETIME_FOUR_DIGIT_YEAR_NO_SECONDS

      public static final Format DATETIME_FOUR_DIGIT_YEAR_NO_SECONDS
      formatter to use for datetimes with 4-digit years but without showing seconds
    • DATETIMEFORMAT

      public static final Format DATETIMEFORMAT
      formatter to use for datetimes (will use multiple fall backs)
    • TIMEFORMAT

      public static final Format TIMEFORMAT
      formatter to use for times (will use multiple fall backs)
  • Constructor Details

    • PromptValue

      public PromptValue(int type)
      Creates a prompt values of the given type initialized with the default value of its type
      Parameters:
      type - type of this default value.
      Since:
      9.2
    • PromptValue

      public PromptValue(String description, int type)
      Creates a prompt values of the given type initialized with the default value of its type
      Parameters:
      type - type of this default value.
      description - description of this prompt
      Since:
      9.2
  • Method Details

    • getStringRepresentation

      public abstract String getStringRepresentation()
      Returns a string representation of the value of this prompt.
      Returns:
      a string representation of the value of this prompt.
      Since:
      9.2
    • getValue

      public abstract Object getValue()
      Returns the value of this prompt - its type will depend on which value type this PromptValue has: String for STRING
      Double for NUMBER and CURRENCY
      Boolean for BOOLEAN
      Date for DATE and DATETIME
      Time for TIME
      byte[] for BINARY
      Returns:
      the value of this prompt - its type will depend on which value type this PromptValue has.
      Since:
      9.2
    • toString

      public String toString()
      Creates a formated string representation of this prompt value with its decription and value.
      Overrides:
      toString in class Object
      Returns:
      String representation
      Since:
      9.2
    • getDescription

      public String getDescription()
      Returns the description of the parameter field that has been set using API or i-net Designer dialog.
      Returns:
      description of the parameter field
      Since:
      9.2
    • setDescription

      public void setDescription(String description)
      Set the description of the parameter field that can be used with API or in the prompt request dialog.
      Parameters:
      description - of the parameter field
      Since:
      9.2
    • getType

      public int getType()
      Get value type of the prompt, see the value type constants in PromptData
      Returns:
      value type of the prompt, see the value type constants in PromptData
      Since:
      9.2
    • isOnlyDescription

      public boolean isOnlyDescription()
      If true only the description will be displayed in the report dialog. (only necessary if this prompt value represents a default value)
      Returns:
      whether only description is displayed
      Since:
      9.2
    • setOnlyDescription

      public void setOnlyDescription(boolean onlyDescription)
      Sets the appearance of this value in the prompt dialog. (only necessary if this promtvalue represents a default value)
      Parameters:
      onlyDescription - whether only description shall be displayed
      Since:
      9.2
    • getSQLTypedValue

      public abstract Object getSQLTypedValue()
      this method returns the value of this promptvalue using an SQL compatible type. The returned type could be.
      Returns:
      value of this promptvalue using an SQL compatible type.
      Since:
      9.2