ru.onego.industrial.catalog.meta
Class StringValue

java.lang.Object
  extended by ru.onego.industrial.catalog.meta.StringValue
All Implemented Interfaces:
ColumnValue

public class StringValue
extends java.lang.Object
implements ColumnValue

Default value for all columns. Holds plain String value.

Version:
1.0
Author:
Lev Levin

Constructor Summary
StringValue()
           
 
Method Summary
 void add(java.lang.Object value)
          Implements logic of adding data to existing data stored in this Column Value object.
 java.lang.String getName()
          Returns internal name of the value type.
 java.lang.Object getValue()
          Returns stored value.
 boolean isEmpty()
          Tests if this value is empty.
 void setValue(java.lang.Object value)
          Sets value for this type.
 void setValue(java.lang.String value)
          Sets string value for this type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringValue

public StringValue()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ColumnValue
Returns internal name of the value type. This name is used to define column type in parser.ini file.

Specified by:
getName in interface ColumnValue
Returns:
Name of type

setValue

public void setValue(java.lang.Object value)
              throws MetaException
Description copied from interface: ColumnValue
Sets value for this type. Value should match the internal holder type.

Specified by:
setValue in interface ColumnValue
Parameters:
value - Value to set
Throws:
MetaException - Thrown if value doen't match internal type of data

setValue

public void setValue(java.lang.String value)
Description copied from interface: ColumnValue
Sets string value for this type. Value should be convertable to internal type.

Specified by:
setValue in interface ColumnValue
Parameters:
value - Value to be set

getValue

public java.lang.Object getValue()
Description copied from interface: ColumnValue
Returns stored value.

Specified by:
getValue in interface ColumnValue
Returns:
Value

isEmpty

public boolean isEmpty()
Description copied from interface: ColumnValue
Tests if this value is empty. If value if empty, true is returned.

Specified by:
isEmpty in interface ColumnValue
Returns:
true if value is empty

add

public void add(java.lang.Object value)
         throws MetaException
Description copied from interface: ColumnValue
Implements logic of adding data to existing data stored in this Column Value object. Each type implements its own logic.

Specified by:
add in interface ColumnValue
Parameters:
value - Value to be added.
Throws:
MetaException - Thrown if value type is not convertable to internal type

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object