Package com.inet.viewer
Class PromptValue
java.lang.Object
com.inet.viewer.PromptValue
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RangePromptValue
Abstract super class of a prompt value
- Since:
- 9.2
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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 secondsstatic final Format
formatter to use for datetimes with 4-digit years and secondsstatic final Format
formatter to use for datetimes (will use multiple fall backs)static NumberFormat
formatter to use for numbersstatic NumberFormat
needed for format with english decimal pointsstatic final Format
formatter to use for times (will use multiple fall backs) -
Constructor Summary
ConstructorDescriptionPromptValue
(int type) Creates a prompt values of the given type initialized with the default value of its typePromptValue
(String description, int type) Creates a prompt values of the given type initialized with the default value of its type -
Method Summary
Modifier and TypeMethodDescriptionReturns 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
getType()
Get value type of the prompt, see the value type constants inPromptData
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 BINARYboolean
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.toString()
Creates a formated string representation of this prompt value with its decription and value.
-
Field Details
-
NUMBERFORMAT
formatter to use for numbers -
NUMBERFORMAT_ENGLISH
needed for format with english decimal points -
DATEFORMAT
formatter to use for dates (will use multiple fall backs) -
DATETIME_FOUR_DIGIT_YEAR_WITH_SECONDS
formatter to use for datetimes with 4-digit years and seconds -
DATETIME_FOUR_DIGIT_YEAR_NO_SECONDS
formatter to use for datetimes with 4-digit years but without showing seconds -
DATETIMEFORMAT
formatter to use for datetimes (will use multiple fall backs) -
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
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
Returns a string representation of the value of this prompt.- Returns:
- a string representation of the value of this prompt.
- Since:
- 9.2
-
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
Creates a formated string representation of this prompt value with its decription and value. -
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
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
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
-