LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.data
Class LyFieldInfoValue

java.lang.Object
  extended by leon.data.LyValue
      extended by leon.data.LyFieldInfoValue
Direct Known Subclasses:
LyArrayValue, LyBooleanValue, LyChoiceValue, LyDateValue, LyFileValue, LyNumberValue, LyRelationValue, LyTextValue

public class LyFieldInfoValue
extends LyValue

This class is a value wrapper, it offers methods for constructing, accessing and modifying values corresponding to a fieldInfo.

It offers methods that hides the internal representation of the different types of fieldInfos for consulting, creating and modifying logical objects (LyObject).

For existing objects, these "wrapped values" can be got by using getFieldValue method of LyObject.

This class is abstract. A class, adapted to each sub-type of fieldInfo, is provided (see inherited classes).

See Also:
LyFieldInfo, LyObject, LyObject.getFieldValue(java.lang.String)

Field Summary
static java.lang.String __VERSION
          File version
 
Constructor Summary
LyFieldInfoValue(LyFieldInfo fieldInfo)
          Constructs an empty value for the given fieldInfo.
LyFieldInfoValue(LyFieldInfo fieldInfo, java.lang.Object value)
          Constructs a value for the given fieldInfo from an untyped object.
LyFieldInfoValue(LyFieldInfo fieldInfo, java.lang.String value)
          Constructs a value for the given fieldInfo from a string.
 
Method Summary
 int compare(LyFieldInfoValue value)
          Compares this value to the given value.
 boolean contains(LyFieldInfoValue value)
          Checks if the given value is contained in this value.
 boolean equals(LyFieldInfoValue value)
          Compares this value to the given value for equality.
 boolean equals(java.lang.Object value)
          Compares this value to the given value for equality.
 LyFieldInfo getFieldInfo()
          Gets the fieldInfo to which this value corresponds.
 java.lang.String getName()
          Returns a "displayable string" (string that can be shown to the end-user) for this value.
 java.lang.String getName(boolean removeTags)
          Returns a "displayable string" (string that can be shown to the end-user) for this value.
 java.lang.String getShortName()
          Returns this value as a short "displayable string" (short string that can be shown to the end-user).
 java.lang.String getString()
          Converts this value to an "internal" string (not shown to end-user, but that enables reconstruction through LyFieldInfo.parse or using the constructor with value passed as string).
 
Methods inherited from class leon.data.LyValue
getField, getValue, isNull, setValue, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyFieldInfoValue

public LyFieldInfoValue(LyFieldInfo fieldInfo)
Constructs an empty value for the given fieldInfo.

Parameters:
fieldInfo - FieldInfo for which a value is created.

LyFieldInfoValue

public LyFieldInfoValue(LyFieldInfo fieldInfo,
                        java.lang.Object value)
Constructs a value for the given fieldInfo from an untyped object.

Parameters:
fieldInfo - FieldInfo for which a value is created.
value - Value given as an untyped object.

LyFieldInfoValue

public LyFieldInfoValue(LyFieldInfo fieldInfo,
                        java.lang.String value)
Constructs a value for the given fieldInfo from a string. The precise content of this string depends on each type of fieldInfo (see similar constructors in inherited classes).

Parameters:
fieldInfo - FieldInfo for which a value is created.
value - Value given as a string. This method uses the parse method of LyFieldInfo.
See Also:
LyFieldInfo.parse(java.lang.String)
Method Detail

getFieldInfo

public LyFieldInfo getFieldInfo()
Gets the fieldInfo to which this value corresponds. Result of LyValue.getField casted as to LyFieldInfo.

Returns:
FieldInfo of this value.

getName

public final java.lang.String getName()
Returns a "displayable string" (string that can be shown to the end-user) for this value.

Returns:
The value presented as a displayable String. This method uses the toName method of LyFieldInfo. The result depends on each type of fieldInfo.
See Also:
LyFieldInfo.toName(java.lang.Object)

getName

public java.lang.String getName(boolean removeTags)
Returns a "displayable string" (string that can be shown to the end-user) for this value.

Parameters:
removeTags - Remove rich-text tags.
Returns:
The value presented as a displayable String. This method uses the toName method of LyFieldInfo. The result depends on each type of fieldInfo.
See Also:
LyFieldInfo.toName(java.lang.Object)

getShortName

public java.lang.String getShortName()
Returns this value as a short "displayable string" (short string that can be shown to the end-user).

Returns:
The value presented as a short displayable String. This method uses the toShortName method of LyFieldInfo. The result depends on each type of fieldInfo.
See Also:
LyFieldInfo.toShortName(java.lang.Object)

getString

public java.lang.String getString()
Converts this value to an "internal" string (not shown to end-user, but that enables reconstruction through LyFieldInfo.parse or using the constructor with value passed as string). This string may not be significant to the end-user and usually should not be displayed.

Overrides:
getString in class LyValue
Returns:
An internal String corresponding to this value. This method uses the toString method of LyFieldInfo. The result depends on each type of fieldInfo.
See Also:
LyFieldInfo.toString(java.lang.Object), LyFieldInfo.parse(java.lang.String)

compare

public final int compare(LyFieldInfoValue value)
Compares this value to the given value.

Parameters:
value - Value to which this value is compared.
Returns:
0 If the two values are identical, a positive number if this value1 is "greater" than the given value. A negative number is returned, otherwise.
See Also:
LyFieldInfo.compare(java.lang.Object, java.lang.Object, java.util.BitSet)

equals

public final boolean equals(LyFieldInfoValue value)
Compares this value to the given value for equality.

Parameters:
value - Value to which this value is compared.
Returns:
True if the values are equals, else false.
See Also:
LyFieldInfo.compare(java.lang.Object, java.lang.Object, java.util.BitSet)

equals

public boolean equals(java.lang.Object value)
Compares this value to the given value for equality.

Overrides:
equals in class java.lang.Object
Parameters:
value - Value to which this value is compared.
Returns:
True if the values are equals, else false.
See Also:
LyFieldInfo.compare(java.lang.Object, java.lang.Object, java.util.BitSet)

contains

public final boolean contains(LyFieldInfoValue value)
Checks if the given value is contained in this value.

Parameters:
value - Value to which this value is compared.
Returns:
True if the second value is contained in the this value, else returns false.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com