Class LayoutField
java.lang.Object
cl.obcom.desktopfx.layout.LayoutField
- All Implemented Interfaces:
Serializable
Data item whose value can be edited with a
LayoutMessage. A
LayoutField has a type, a name, a length, a numeric scale
and a default value. The values of these properties have restrictions
depending on the type of the field. See FieldType for details about
these restrictions.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal CharactergetChar(LayoutMessage message, int index) Returns the first character of the string value of theindexoccurence of this field inmessage.final CharactergetChar(LayoutMessage message, int index, boolean strict) Returns the first character of the string value of theindexoccurence of this field inmessage.final DategetDate(LayoutMessage message, int index) Returns the date value of theindexoccurence of this field inmessage.getDate(LayoutMessage message, int index, boolean strict) Returns the date value of theindexoccurence of this field inmessage.Returns the default value of this field.final StringReturns the defined default value of this field.final DoublegetDouble(LayoutMessage message, int index) Returns the double value of theindexoccurence of this field inmessage.final DoublegetDouble(LayoutMessage message, int index, boolean strict) Returns the double value of theindexoccurence of this field inmessage.intReturns the length of the formatted values of this field.final IntegergetInteger(LayoutMessage message, int index) Returns the integer value of theindexoccurence of this field inmessage.final IntegergetInteger(LayoutMessage message, int index, boolean strict) Returns the integer value of theindexoccurence of this field inmessage.final LayoutReturns the layout of this field ornullif undefined.final intReturns the length of each occurrence of this field.final LocaleReturns the locale of this field.final LonggetLong(LayoutMessage message, int index) Returns the long value of theindexoccurence of this field inmessage.final LonggetLong(LayoutMessage message, int index, boolean strict) Returns the long value of theindexoccurence of this field inmessage.final StringgetName()Returns the name of this field.final BigDecimalgetNumber(LayoutMessage message, int index) Returns the decimal value of theindexoccurence of this field inmessage.getNumber(LayoutMessage message, int index, boolean strict) Returns the decimal value of theindexoccurence of this field inmessage.final intReturns the number of occurrences of this field.final intgetOffset(int index) Returns the offset position of theindexoccurence of this field in a message or it's parent list.final LayoutFieldReturns the list field that contains this field.final intgetScale()Returns the numeric scale of this field.final StringgetString(LayoutMessage message, int index) Returns the string value of theindexoccurence of this field inmessage.getString(LayoutMessage message, int index, boolean strict) Returns the string value of theindexoccurence of this field inmessage.final StringgetSubstring(LayoutMessage message, int index) Returns a substring of theindexoccurence of this field inmessage.final StringgetSubstring(LayoutMessage message, int index, boolean rtrim, boolean nodata) Returns a substring of theindexoccurence of this field inmessage.final FieldTypegetType()Returns the type of this field.final ObjectgetValue(LayoutMessage message, int index) Returns the object value of theindexoccurence of this field inmessage.getValue(LayoutMessage message, int index, boolean strict) Returns the object value of theindexoccurence of this field inmessage.final booleanReturnstrueif numbers are formatted using group separators.final booleanisNull(LayoutMessage message, int index) Returnstrueif the value of theindexoccurence of this field inmessageis NULL.final voidsetChar(LayoutMessage message, int index, Character value) Changes the character value of theindexoccurence of this field inmessage.final voidsetChar(LayoutMessage message, int index, Character value, boolean strict) Changes the character value of theindexoccurence of this field inmessage.final voidsetDate(LayoutMessage message, int index, Date date) Changes the date value of theindexoccurence of this field inmessage.voidsetDate(LayoutMessage message, int index, Date date, boolean strict) Changes the date value of theindexoccurence of this field inmessage.voidsetDefault(LayoutMessage message, int index) Changes the value of theindexoccurence of this field inmessageto its default value.final voidsetDouble(LayoutMessage message, int index, Double value) Changes the double value of theindexoccurence of this field inmessage.final voidsetDouble(LayoutMessage message, int index, Double value, boolean strict) Changes the double value of theindexoccurence of this field inmessage.voidsetGroupingUsed(boolean groupingUsed) Changes whether numbers are formatted using group separators.final voidsetInteger(LayoutMessage message, int index, Integer value) Changes the integer value of theindexoccurence of this field inmessage.final voidsetInteger(LayoutMessage message, int index, Integer value, boolean strict) Changes the integer value of theindexoccurence of this field inmessage.voidChanges the locale of this field.final voidsetLong(LayoutMessage message, int index, Long value) Changes the long value of theindexoccurence of this field inmessage.final voidsetLong(LayoutMessage message, int index, Long value, boolean strict) Changes the long value of theindexoccurence of this field inmessage.voidsetNull(LayoutMessage message, int index) Changes the value of theindexoccurence of this field inmessageto NULL.final voidsetNumber(LayoutMessage message, int index, BigDecimal value) Changes the decimal value of theindexoccurence of this field inmessage.voidsetNumber(LayoutMessage message, int index, BigDecimal value, boolean strict) Changes the decimal value of theindexoccurence of this field inmessage.final voidsetString(LayoutMessage message, int index, String value) Changes the string value of theindexoccurence of this field inmessage.voidsetString(LayoutMessage message, int index, String value, boolean strict) Changes the string value of theindexoccurence of this field inmessage.final voidsetSubstring(LayoutMessage message, int index, String value) Replaces a substring of theindexoccurence of this field inmessage.final voidsetSubstring(LayoutMessage message, int index, String value, boolean strict) Replaces a substring of theindexoccurence of this field inmessage.final voidsetValue(LayoutMessage message, int index, Object value) Changes the object value of theindexoccurence of this field inmessage.voidsetValue(LayoutMessage message, int index, Object value, boolean strict) Changes the object value of theindexoccurence of this field inmessage.
-
Method Details
-
getType
-
getLayout
Returns the layout of this field ornullif undefined.- Returns:
- the layout of this field or
nullif undefined.
-
getName
-
getLength
public final int getLength()Returns the length of each occurrence of this field.- Returns:
- the length of each occurrence of this field.
-
getScale
public final int getScale()Returns the numeric scale of this field.- Returns:
- the numeric scale of this field.
-
getOccurs
public final int getOccurs()Returns the number of occurrences of this field.- Returns:
- the number of occurrences of this field.
-
getFormattedLength
public int getFormattedLength()Returns the length of the formatted values of this field.- Returns:
- the length of the formatted values of this field.
-
getLocale
Returns the locale of this field. This locale is used by fields that are locale-sensitive (such as numeric fields) when they are converted to/from strings. Initially, a field uses the default JVM locale.- Returns:
- the locale of this field or
nullfor default locale.
-
setLocale
Changes the locale of this field. This locale is used by fields that are locale-sensitive (such as numeric fields) when they are converted to/from strings. If suppliedlocaleisnull, the default JVM locale is used.- Parameters:
locale- the new layout locale (can be null).
-
isGroupingUsed
public final boolean isGroupingUsed()Returnstrueif numbers are formatted using group separators.- Returns:
trueif numbers are formatted using group separators.
-
setGroupingUsed
public void setGroupingUsed(boolean groupingUsed) Changes whether numbers are formatted using group separators.- Parameters:
groupingUsed- the new value of this property.
-
getDefinedDefault
Returns the defined default value of this field. If the field does not have a defined default value, it returnsnull.- Returns:
- the default value of this field or
nullif the field does not have a defined default value.
-
getDefault
-
setDefault
Changes the value of theindexoccurence of this field inmessageto its default value. If the field's default value is invalid, then the type's default value is used.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.
-
getParent
Returns the list field that contains this field. If this field does not belong to a list, it returnsnull. Fields of typeFieldType.LISTalways returnnullbecause list fields cannot be defined (contained) within other lists.- Returns:
- the list field that contains this field or
null.
-
getOffset
public final int getOffset(int index) Returns the offset position of theindexoccurence of this field in a message or it's parent list.- Parameters:
index- the occurence index of the field.- Returns:
- the offset position of this field in a message or parent list.
- Throws:
IndexOutOfBoundsException- ifindexis out-of-bounds.
-
isNull
Returnstrueif the value of theindexoccurence of this field inmessageis NULL. The value is NULL if the first character of it's substring isNO-DATA(0x1A). The substring begins atgetOffsetwith a length given bygetLength()- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
trueif the value of this field is NULL.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.
-
setNull
Changes the value of theindexoccurence of this field inmessageto NULL. The value is set to NULL by replacing all characters of it's substring withNO-DATA(0x1A).- Parameters:
message- the layout message editor.index- the occurence index of the field.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.
-
getSubstring
Returns a substring of theindexoccurence of this field inmessage. The substring begins atgetOffsetwith a length given bygetLength(). Trailing spaces are removed. It returnsnullif the first character of the substring isNO-DATA(0x1A).- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the requiered substring or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.
-
getSubstring
Returns a substring of theindexoccurence of this field inmessage. The substring begins atgetOffsetwith a length given bygetLength(). Ifrtrimistrue, trailing spaces are removed. It returnsnullifnodataistrueand the first character of the substring isNO-DATA(0x1A). Ifnodataisfalse, the returned substring includesNO-DATA(0x1A) characters.- Parameters:
message- the layout message editor.index- the occurence index of the field.rtrim- iftrueremove trailing spaces.nodata- iftruecheck for NO-DATA.- Returns:
- the requiered substring or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.
-
setSubstring
Replaces a substring of theindexoccurence of this field inmessage. The substring begins atgetOffset(int)method with a length given bygetLength(). Ifvalueisnull, the substring is filled withNO-DATA(0x1A) characters. Ifvalueis shorter than the substring, the remaining space is filled with spaces. Ifvalueis too long, it is truncated.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new character sequence of this field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.IllegalArgumentException- if strict andvalueis too long.
-
setSubstring
Replaces a substring of theindexoccurence of this field inmessage. The substring begins atgetOffset(int)method with a length given bygetLength(). Ifvalueisnull, the substring is filled withNO-DATA(0x1A) characters. Ifvalueis shorter than the substring, the remaining space is filled with spaces. Ifvalueis too long, it is truncated, unlessstrictistrue, in which case an exception is thrown.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new character sequence of this field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.IllegalArgumentException- if strict andvalueis too long.
-
getString
Returns the string value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the string value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.
-
getString
Returns the string value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the string value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.
-
setString
Changes the string value of theindexoccurence of this field inmessage. The suppliedvalueis formatted according to the type of this field, and the resulting text is stored inmessage. Ifvalueisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the string representation of the field value.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- ifvaluehas an invalid format.
-
setString
Changes the string value of theindexoccurence of this field inmessage. The suppliedvalueis formatted according to the type of this field, and the resulting text is stored inmessage. Ifvalueisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the string representation of the field value.strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- ifvaluehas an invalid format.
-
getChar
Returns the first character of the string value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the character value of the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.
-
getChar
Returns the first character of the string value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the character value of the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.
-
setChar
Changes the character value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new character value of the field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- ifvaluehas an invalid format.
-
setChar
Changes the character value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new character value of the field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- ifvaluehas an invalid format.
-
getNumber
Returns the decimal value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isNUMERICorSIGNED. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the decimal value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getNumber
Returns the decimal value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isNUMERICorSIGNED. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the decimal value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setNumber
Changes the decimal value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isNUMERICorSIGNED. Ifdecimalisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- decimal value of the field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setNumber
Changes the decimal value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isNUMERICorSIGNED. Ifdecimalisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- decimal value of the field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getDouble
Returns the double value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the double value of the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getDouble
Returns the double value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the double value of the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setDouble
Changes the double value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new double value of the field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setDouble
Changes the double value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new double value of the field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getInteger
Returns the integer value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the integer value of the the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getInteger
Returns the integer value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the integer value of the the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setInteger
Changes the integer value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new integer value of the field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setInteger
Changes the integer value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new integer value of the field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getLong
Returns the long value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the long value of the the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getLong
Returns the long value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the long value of the the field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setLong
Changes the long value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new long value of the field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
setLong
Changes the long value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new long value of the field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notNUMERICorSIGNED.
-
getDate
Returns the date value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isDATE. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the date value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notDATE.
-
getDate
Returns the date value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isDATE. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the date value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.UnsupportedOperationException- if the type of this field is notDATE.
-
setDate
Changes the date value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isDATE. Ifdateisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.date- the new date value of the field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notDATE.
-
setDate
Changes the date value of theindexoccurence of this field inmessage. This method can only be used if the type of this field isDATE. Ifdateisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.date- the new date value of the field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.UnsupportedOperationException- if the type of this field is notDATE.
-
getValue
Returns the object value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.- Returns:
- the object value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.
-
getValue
Returns the object value of theindexoccurence of this field inmessage. It returnsnullif the value of the field is NULL. Ifstrictistruean exception is thrown ifmessageis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.strict- iftruethrows an exception if message is invalid.- Returns:
- the object value of this field or
null. - Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if the field record data is invalid.
-
setValue
Changes the object value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new object value of the field (can be null).- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if suppliedvalueis invalid.
-
setValue
Changes the object value of theindexoccurence of this field inmessage. Ifvalueisnull, the value of the field is set to NULL. Ifstrictistruean exception is thrown ifvalueis invalid.- Parameters:
message- the layout message editor.index- the occurence index of the field.value- the new object value of the field (can be null).strict- iftruethrows an exception if value is invalid.- Throws:
NullPointerException- ifmessageisnull.IndexOutOfBoundsException- ifindexis out-of-bounds.ValueFormatException- if suppliedvalueis invalid.
-