ru.onego.industrial.catalog.meta
Interface ColumnValue

All Known Implementing Classes:
DoubleValue, IDValue, StringValue

public interface ColumnValue

Defines column value type.

Version:
1.0
Author:
Lev Levin

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.
 

Method Detail

getName

java.lang.String getName()
Returns internal name of the value type. This name is used to define column type in parser.ini file.

Returns:
Name of type

setValue

void setValue(java.lang.Object value)
              throws MetaException
Sets value for this type. Value should match the internal holder type.

Parameters:
value - Value to set
Throws:
MetaException - Thrown if value doen't match internal type of data

setValue

void setValue(java.lang.String value)
              throws MetaException
Sets string value for this type. Value should be convertable to internal type.

Parameters:
value - Value to be set
Throws:
MetaException - Thrown if value caanot be converted to internal type

getValue

java.lang.Object getValue()
Returns stored value.

Returns:
Value

isEmpty

boolean isEmpty()
Tests if this value is empty. If value if empty, true is returned.

Returns:
true if value is empty

add

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

Parameters:
value - Value to be added.
Throws:
MetaException - Thrown if value type is not convertable to internal type