Klasse DefaultValue
java.lang.Object
com.inet.report.DefaultValue
- Alle implementierten Schnittstellen:
Serializable, Cloneable
Holder for a
PromptField's default value and its description. If the default value does not have a description, getDescription() will return null. The default value's "value" may be
null.- Seit:
- 7.6
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenModifikatorKonstruktorBeschreibungDefaultValue(Object value, String description) Creates a default value with field value type set as UNKNOWNDefaultValue(Object value, String description, int type) Creates a DefaultValue with the given value and description.protectedDefaultValue(String description, int type) internal constructor -
Methodenübersicht
Modifikator und TypMethodeBeschreibungclone()static DefaultValuecreateBinaryDefaultValue(String value, String description) Creates and returns a default value of value type Field.BINARY.static DefaultValuecreateDefaultValueFromFormula(String value, String description, int valueType, Engine engine) Creates and returns a default value by parsing the given value string as a CC formula.static DefaultValuecreateDefaultValueFromFormula(String value, String description, Engine engine) Creates and returns a default value by parsing the given value string as a CC formula.static com.inet.report.FormulaDefaultValuecreateFormulaFieldDefaultValueFromFormula(FormulaField formulaField, String description, int valueType, Engine engine) creates and returns a default value based on the formula given.booleanReturns the description of this default value.intgetType()Returns the value type set in the constructor for this default valuegetValue()Returns the value of this default value.inthashCode()voidsetDescription(String description) Sets the description of this default value.voidSets the value of this default value.
-
Konstruktordetails
-
DefaultValue
internal constructor- Parameter:
description- description of default valuetype- value type of default value- Seit:
- 11.0
-
DefaultValue
Creates a DefaultValue with the given value and description. The object must be of a certain type, depending on the value type of the Prompt Field:NUMBER:java.lang.DoubleCURRENCY:java.lang.DoubleBOOLEAN:java.lang.BooleanDATE:java.sql.DateTIME:java.sql.TimeDATETIME:java.sql.TimestampSTRING:java.lang.StringRange:com.inet.report.FormulaRange
- Parameter:
value- Value of the default valuedescription- Description of the default value, can be null if there is no descriptiontype- field type of the prompt field to which this default value belongs- Löst aus:
IllegalArgumentException- if the field type does not match the object type or if the field type is unknown- Seit:
- 7.6
- Siehe auch:
-
DefaultValue
-
-
Methodendetails
-
createDefaultValueFromFormula
public static DefaultValue createDefaultValueFromFormula(String value, String description, Engine engine) throws ReportException Creates and returns a default value by parsing the given value string as a CC formula.- Parameter:
value- value as formula syntaxdescription- description of the default value, can be nullengine- engine used to parse the formula- Gibt zurück:
- created default value
- Löst aus:
ReportException- if an error occurs while parsing the formula- Seit:
- 7.6
-
createDefaultValueFromFormula
public static DefaultValue createDefaultValueFromFormula(String value, String description, int valueType, Engine engine) throws ReportException Creates and returns a default value by parsing the given value string as a CC formula. Checks to make sure the formula's value type is the same as the value type given.- Parameter:
value- value as formula syntaxdescription- description of the default value, can be nullvalueType- value type of the default value to be created.engine- engine used to parse the formula- Gibt zurück:
- created default value
- Löst aus:
ReportException- if an error occurs while parsing the formula- Seit:
- 7.6
-
createFormulaFieldDefaultValueFromFormula
public static com.inet.report.FormulaDefaultValue createFormulaFieldDefaultValueFromFormula(FormulaField formulaField, String description, int valueType, Engine engine) creates and returns a default value based on the formula given. When a prompt is created with FormulaDefaultValues, the values are parsed at run-time, making it possible to have dynamically created yet "static" default values- Parameter:
formulaField- formula field to base default value ondescription- description of default valuevalueType- value type of default valueengine- engine used to parse the formula- Gibt zurück:
- created formula default value
- Seit:
- 11.0
-
createBinaryDefaultValue
Creates and returns a default value of value type Field.BINARY. The value string is parsed as a Base64 encoded byte array.- Parameter:
value- Base64-encoded byte array as stringdescription- description of the default value, can be null- Gibt zurück:
- Created default value
- Seit:
- 7.6
-
getValue
Returns the value of this default value. Can be null. The type of this value depends on the type of the prompt field.
NUMBER:java.lang.DoubleCURRENCY:java.lang.DoubleBOOLEAN:java.lang.BooleanDATE:java.sql.DateTIME:java.sql.TimeDATETIME:java.sql.TimestampSTRING:java.lang.StringRange:com.inet.report.FormulaRange
- Gibt zurück:
- Value of this default value. Can be null.
- Seit:
- 7.6
- Siehe auch:
-
setValue
Sets the value of this default value. Can be null. The type of the object allowed to be set depends of the type of the prompt field.
NUMBER:java.lang.DoubleCURRENCY:java.lang.DoubleBOOLEAN:java.lang.BooleanDATE:java.sql.DateTIME:java.sql.TimeDATETIME:java.sql.TimestampSTRING:java.lang.StringRange:com.inet.report.FormulaRange
- Parameter:
value- value to set.- Seit:
- 7.6
- Siehe auch:
-
getDescription
Returns the description of this default value. Will be null if there is no description for this DefaultValue.- Gibt zurück:
- the description of this default value
- Seit:
- 7.6
-
setDescription
Sets the description of this default value. The description can be set to null which means this default value has not description- Parameter:
description- description to set for this default value- Seit:
- 7.6
-
getType
public int getType()Returns the value type set in the constructor for this default value- Gibt zurück:
- field value type of this default value.
- Seit:
- 7.6
- Siehe auch:
-
equals
-
hashCode
-
clone
- Setzt außer Kraft:
clonein KlasseObject- Löst aus:
CloneNotSupportedException
-