org.jlf.dataMap
Class StringAttribute

java.lang.Object
  |
  +--org.jlf.dataMap.DataAttribute
        |
        +--org.jlf.dataMap.StringAttribute
All Implemented Interfaces:
java.io.Serializable

public class StringAttribute
extends DataAttribute

This class is used as the base of all attributes in the data mapping framework

See Also:
DataAttribute, DataAttributeDescriptor, Serialized Form

Field Summary
 
Fields inherited from class org.jlf.dataMap.DataAttribute
hasChanged, name, originalValue, value
 
Constructor Summary
StringAttribute()
          Default constructor.
StringAttribute(java.lang.String name)
          Normal attribute constructor.
 
Method Summary
 void basicSetValue(java.lang.Object newValue)
          Override for String-specific behavior.
 void basicSetValue(java.lang.String newValue)
          Main setter for string values to ensure the string is not too long if a maximum length was specified.
 int getMaximumStringLength()
          Retrieves the maximum length allowed for the string.
 void setMaximumStringLength(int maximumStringLength)
          Sets the maximum length allowed for the string.
 
Methods inherited from class org.jlf.dataMap.DataAttribute
getDoubleValue, getLongValue, getName, getOriginalValue, getStringValue, getValue, hasChanged, resetAndSetValue, resetHasChanged, setName, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringAttribute

public StringAttribute()
Default constructor. Try to use the parameterized constructor with an attribute name to construct the attribute.


StringAttribute

public StringAttribute(java.lang.String name)
Normal attribute constructor.

Method Detail

getMaximumStringLength

public int getMaximumStringLength()
Retrieves the maximum length allowed for the string. If the length is less than 1, there is no maximum.


setMaximumStringLength

public void setMaximumStringLength(int maximumStringLength)
Sets the maximum length allowed for the string. If the length is zero or negative, there is no maximum.


basicSetValue

public void basicSetValue(java.lang.Object newValue)
Override for String-specific behavior.

Overrides:
basicSetValue in class DataAttribute

basicSetValue

public void basicSetValue(java.lang.String newValue)
Main setter for string values to ensure the string is not too long if a maximum length was specified.