Package com.inet.viewer
Class PromptValue
- java.lang.Object
-
- com.inet.viewer.PromptValue
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
RangePromptValue
@JsonData public abstract class PromptValue extends java.lang.Object implements java.io.SerializableAbstract super class of a prompt value- Since:
- 9.2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.text.FormatDATEFORMATformatter to use for dates (will use multiple fall backs)static java.text.FormatDATETIME_FOUR_DIGIT_YEAR_NO_SECONDSformatter to use for datetimes with 4-digit years but without showing secondsstatic java.text.FormatDATETIME_FOUR_DIGIT_YEAR_WITH_SECONDSformatter to use for datetimes with 4-digit years and secondsstatic java.text.FormatDATETIMEFORMATformatter to use for datetimes (will use multiple fall backs)static java.text.NumberFormatNUMBERFORMATformatter to use for numbersstatic java.text.NumberFormatNUMBERFORMAT_ENGLISHneeded for format with english decimal pointsstatic java.text.FormatTIMEFORMATformatter 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 typePromptValue(java.lang.String description, int type)Creates a prompt values of the given type initialized with the default value of its type
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Returns the description of the parameter field that has been set using API or i-net Designer dialog.abstract java.lang.ObjectgetSQLTypedValue()this method returns the value of this promptvalue using an SQL compatible type.abstract java.lang.StringgetStringRepresentation()Returns a string representation of the value of this prompt.intgetType()Get value type of the prompt, see the value type constants inPromptDataabstract java.lang.ObjectgetValue()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 BINARYbooleanisOnlyDescription()If true only the description will be displayed in the report dialog.voidsetDescription(java.lang.String description)Set the description of the parameter field that can be used with API or in the prompt request dialog.voidsetOnlyDescription(boolean onlyDescription)Sets the appearance of this value in the prompt dialog.java.lang.StringtoString()Creates a formated string representation of this prompt value with its decription and value.
-
-
-
Field Detail
-
NUMBERFORMAT
public static java.text.NumberFormat NUMBERFORMAT
formatter to use for numbers
-
NUMBERFORMAT_ENGLISH
public static java.text.NumberFormat NUMBERFORMAT_ENGLISH
needed for format with english decimal points
-
DATEFORMAT
public static final java.text.Format DATEFORMAT
formatter to use for dates (will use multiple fall backs)
-
DATETIME_FOUR_DIGIT_YEAR_WITH_SECONDS
public static final java.text.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 java.text.Format DATETIME_FOUR_DIGIT_YEAR_NO_SECONDS
formatter to use for datetimes with 4-digit years but without showing seconds
-
DATETIMEFORMAT
public static final java.text.Format DATETIMEFORMAT
formatter to use for datetimes (will use multiple fall backs)
-
TIMEFORMAT
public static final java.text.Format TIMEFORMAT
formatter to use for times (will use multiple fall backs)
-
-
Constructor Detail
-
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(java.lang.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 Detail
-
getStringRepresentation
public abstract java.lang.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 java.lang.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 java.lang.String toString()
Creates a formated string representation of this prompt value with its decription and value.- Overrides:
toStringin classjava.lang.Object- Returns:
- String representation
- Since:
- 9.2
-
getDescription
public java.lang.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(java.lang.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 inPromptData- 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 java.lang.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
-
-