ru.onego.industrial.catalog.meta
Interface CatalogLine

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
CatalogLineImpl

public interface CatalogLine
extends java.lang.Comparable

Catalog operates data stored in catalog lines.

Version:
1.0
Author:
Lev Levin

Method Summary
 int columnsCount()
          Returns count of columns represented by this line.
 ColumnValue getColumnValue(int column)
          Returns column value by index of the column
 ColumnValue getColumnValue(java.lang.String column)
          Returns column value stored for column name.
 void setColumnValue(java.lang.String column, java.lang.Object value)
          Sets the column value.
 void setColumnValue(java.lang.String column, java.lang.Object value, boolean notEmpty)
          Sets the column value.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

columnsCount

int columnsCount()
Returns count of columns represented by this line.

Returns:
Number of columns

getColumnValue

ColumnValue getColumnValue(java.lang.String column)
                           throws MetaException
Returns column value stored for column name.

Parameters:
column - Column name
Returns:
ColumnValue object
Throws:
MetaException - Thrown if column not found

getColumnValue

ColumnValue getColumnValue(int column)
                           throws MetaException
Returns column value by index of the column

Parameters:
column - Column value
Returns:
ColumnValue object
Throws:
MetaException - Thrown if index is out of bounds

setColumnValue

void setColumnValue(java.lang.String column,
                    java.lang.Object value)
                    throws MetaException
Sets the column value. Value is always replaced.

Parameters:
column - Column name
value - Value to be set for this column
Throws:
MetaException - Thrown if column is not found or type of the value is wrong.

setColumnValue

void setColumnValue(java.lang.String column,
                    java.lang.Object value,
                    boolean notEmpty)
                    throws MetaException
Sets the column value. Value is replaced only if last parameter is set to false.

Parameters:
column - Column name
value - Value to be set for this column
notEmpty - Specifies if value should be replaced
Throws:
MetaException - Thrown if column is not found or type of the value is wrong.