net.sf.letsparty.cfg
Class BasicPartitionedTable

java.lang.Object
  extended bynet.sf.letsparty.cfg.BasicPartitionedTable
All Implemented Interfaces:
PartitionedTable

public class BasicPartitionedTable
extends java.lang.Object
implements PartitionedTable

A PartitionedTable that uses its columns to find the right list of partitions for a certain condition


Field Summary
protected  java.lang.String name
           
protected  java.util.List partitionedColumns
           
protected  java.lang.String separator
           
 
Constructor Summary
BasicPartitionedTable()
           
 
Method Summary
 void addPartitionedColumn(PartitionedColumn partitionedColumn)
          Called by the configuration builder
 void fillPartitionedTableListNullSuffixes(PartitionedTableSuffixList partitionedTableSuffixList)
          Fill the column null suffixes with all the partitions of the column (for each null column suffix).
 java.lang.String getName()
           
 PartitionedColumn getPartitionedColumn(java.lang.String name)
           
 int getPartitionedColumnIndex(PartitionedColumn partitionedColumn)
           
 java.util.List getPartitionedColumns()
          Returns the list of all the partitioned columns of this table.
 java.lang.String getPartitionedTableNameFromSuffixes(java.lang.String[] suffixes)
          Constructs a table name given a list of column suffixes.
 java.util.List getPartitionedTables(PartitionedTableSuffixList partitionedTableSuffixList)
          A list of table names built using partitionedTableSuffixList
 PartitionedTableSuffixList getPartitionedTableSuffixList()
          Returns a PartitionedTableSuffixList with all the partitions of all the columns.
 void setName(java.lang.String name)
          Called by the configuration builder
 void setPartitionedColumns(java.util.List list)
           
 void setSeparator(java.lang.String separator)
          Called by the configuration builder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

partitionedColumns

protected java.util.List partitionedColumns

name

protected java.lang.String name

separator

protected java.lang.String separator
Constructor Detail

BasicPartitionedTable

public BasicPartitionedTable()
Method Detail

addPartitionedColumn

public void addPartitionedColumn(PartitionedColumn partitionedColumn)
Description copied from interface: PartitionedTable
Called by the configuration builder

Specified by:
addPartitionedColumn in interface PartitionedTable
Parameters:
partitionedColumn -

getPartitionedTableSuffixList

public PartitionedTableSuffixList getPartitionedTableSuffixList()
Description copied from interface: PartitionedTable
Returns a PartitionedTableSuffixList with all the partitions of all the columns.

Specified by:
getPartitionedTableSuffixList in interface PartitionedTable
Returns:
a PartitionedTableSuffixList with all the partitions of all the columns.

fillPartitionedTableListNullSuffixes

public void fillPartitionedTableListNullSuffixes(PartitionedTableSuffixList partitionedTableSuffixList)
Description copied from interface: PartitionedTable
Fill the column null suffixes with all the partitions of the column (for each null column suffix).

Specified by:
fillPartitionedTableListNullSuffixes in interface PartitionedTable

getPartitionedColumn

public PartitionedColumn getPartitionedColumn(java.lang.String name)
Specified by:
getPartitionedColumn in interface PartitionedTable
Parameters:
name -
Returns:
the PartitionedColumn named name

getName

public java.lang.String getName()
Specified by:
getName in interface PartitionedTable

getPartitionedColumns

public java.util.List getPartitionedColumns()
Description copied from interface: PartitionedTable
Returns the list of all the partitioned columns of this table.

Specified by:
getPartitionedColumns in interface PartitionedTable

setName

public void setName(java.lang.String name)
Description copied from interface: PartitionedTable
Called by the configuration builder

Specified by:
setName in interface PartitionedTable
Parameters:
name -

setPartitionedColumns

public void setPartitionedColumns(java.util.List list)

setSeparator

public void setSeparator(java.lang.String separator)
Description copied from interface: PartitionedTable
Called by the configuration builder

Specified by:
setSeparator in interface PartitionedTable
Parameters:
separator -

getPartitionedTables

public java.util.List getPartitionedTables(PartitionedTableSuffixList partitionedTableSuffixList)
                                    throws LetsPartyException
Description copied from interface: PartitionedTable
A list of table names built using partitionedTableSuffixList

Specified by:
getPartitionedTables in interface PartitionedTable
Parameters:
partitionedTableSuffixList -
Returns:
a list of Strings
Throws:
LetsPartyException

getPartitionedTableNameFromSuffixes

public java.lang.String getPartitionedTableNameFromSuffixes(java.lang.String[] suffixes)
Description copied from interface: PartitionedTable
Constructs a table name given a list of column suffixes. Example: if suffixes are {"A", "1"} and partitioned table name is "MYTAB" and separator is "_" returns "MYTAB_A_1"

Specified by:
getPartitionedTableNameFromSuffixes in interface PartitionedTable
Parameters:
suffixes -
Returns:
a table name

getPartitionedColumnIndex

public int getPartitionedColumnIndex(PartitionedColumn partitionedColumn)
Specified by:
getPartitionedColumnIndex in interface PartitionedTable
Returns:
the index of the partitionedColumn in this table