com.sas.dataselectors.filters
Class DefaultFilterValue

com.sas.dataselectors.filters.DefaultFilterValue
All Implemented Interfaces:
FilterValueInterface

public class DefaultFilterValue
implements FilterValueInterface

The default implementation of FilterValueInterface. This class is used within the filter model to represent a single value.

See Also:
FilterValueInterface

Field Summary
static java.lang.String RB_KEY
          The resource key prefix used when retrieving properties for this class.
 
Constructor Summary
DefaultFilterValue(java.lang.Object value, java.lang.String formattedValue, int dataType, java.lang.Object format, java.lang.Object unformattedValue)
          Constructs a new value instance with the specified attributes.
DefaultFilterValue(java.lang.Object value, java.lang.String formattedValue, int dataType, java.lang.Object format, java.lang.Object unformattedValue, java.lang.String toStringMessageFormat)
          Constructs a new value instance with the specified attributes.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares for equality this value with the specified object.
 java.lang.Object getData()
          Returns the native model data for this value.
 int getDataType()
          Returns the type of data this value represents.
 java.lang.Object getFormat()
          Returns the format for this value.
 java.lang.String getFormattedValue()
          Returns the formatted representation of this value.
 java.lang.Object getUnformattedValue()
          Returns the unformatted representation of this value.
 void initStrings()
          Performs any additional initialization needed by this value during construction.
 void setFormattedValue(java.lang.String formattedValue)
          Sets the formatted representation of this value.
 void setUnformattedValue(java.lang.String unformattedValue)
          Sets the unformatted representation of this value.
 java.lang.String toString()
          Returns a String representation of this value.
static java.lang.String toString(FilterValueInterface value)
          Returns the String representation of the specified filter value.
 

Field Detail

RB_KEY

public static java.lang.String RB_KEY
The resource key prefix used when retrieving properties for this class.

Constructor Detail

DefaultFilterValue

public DefaultFilterValue(java.lang.Object value,
                          java.lang.String formattedValue,
                          int dataType,
                          java.lang.Object format,
                          java.lang.Object unformattedValue)
Constructs a new value instance with the specified attributes. The default text format will be used when constructing the toString() return value.

Parameters:
value - the native model object this value represents
formattedValue - the formatted representation of this value
dataType - the type of data this value contains
format - the format for this value
unformattedValue - the unformatted representation of this value

DefaultFilterValue

public DefaultFilterValue(java.lang.Object value,
                          java.lang.String formattedValue,
                          int dataType,
                          java.lang.Object format,
                          java.lang.Object unformattedValue,
                          java.lang.String toStringMessageFormat)
Constructs a new value instance with the specified attributes.

Parameters:
value - the native model object this value represents
formattedValue - the formatted representation of this value
dataType - the type of data this value contains
format - the format for this value
unformattedValue - the unformatted representation of this value
toStringMessageFormat - an optional format that will be used when constructing the return value of toString()
Method Detail

initStrings

public void initStrings()
Performs any additional initialization needed by this value during construction.


getFormattedValue

public java.lang.String getFormattedValue()
Returns the formatted representation of this value.

Specified by:
getFormattedValue in interface FilterValueInterface
Returns:
the formatted value
See Also:
FilterValueInterface.getFormattedValue()

setFormattedValue

public void setFormattedValue(java.lang.String formattedValue)
Sets the formatted representation of this value.

Parameters:
formattedValue - The formatted value.

getUnformattedValue

public java.lang.Object getUnformattedValue()
Returns the unformatted representation of this value.

Specified by:
getUnformattedValue in interface FilterValueInterface
Returns:
the unformatted value
See Also:
FilterValueInterface.getUnformattedValue()

setUnformattedValue

public void setUnformattedValue(java.lang.String unformattedValue)
Sets the unformatted representation of this value.

Parameters:
formattedValue - The unformatted value.

getDataType

public int getDataType()
Returns the type of data this value represents.

Specified by:
getDataType in interface FilterValueInterface
Returns:
the data type
See Also:
FilterValueInterface.getDataType()

getFormat

public java.lang.Object getFormat()
Returns the format for this value.

Specified by:
getFormat in interface FilterValueInterface
Returns:
the format
See Also:
FilterValueInterface.getFormat()

getData

public java.lang.Object getData()
Returns the native model data for this value.

Specified by:
getData in interface FilterValueInterface
Returns:
the data for this value
See Also:
FilterValueInterface.getData()

toString

public static java.lang.String toString(FilterValueInterface value)
Returns the String representation of the specified filter value.

Parameters:
value - the value to examine
Returns:
the String representation of the value

toString

public java.lang.String toString()
Returns a String representation of this value.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this value.

equals

public boolean equals(java.lang.Object obj)
Compares for equality this value with the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare with this value
Returns:
true if the object is equal to this value, false otherwise



Copyright © 2009 SAS Institute Inc. All Rights Reserved.