|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jplate.tabular.impl.defaults.DefaultTable
public class DefaultTable
Default implementation of a TableIfc.
Modifications:
$Date: 2008-12-02 12:32:45 -0500 (Tue, 02 Dec 2008) $
$Revision: 479 $
$Author: sfloess $
$HeadURL: https://jplate.svn.sourceforge.net/svnroot/jplate/trunk/src/dev/java/org/jplate/tabular/impl/defaults/DefaultTable.java $
| Field Summary | |
|---|---|
private org.apache.commons.logging.Log |
_log
Used for logging. |
private RecordFactoryIfc |
_recordFactory
Used to create records. |
private java.util.List<RecordIfc> |
_recordList
Holds all records that belong to a table. |
private java.lang.String |
_tableName
The name of the table. |
static java.lang.String |
DEFAULT_TABLE_NAME
Default table name. |
| Constructor Summary | |
|---|---|
DefaultTable()
Default constructor. |
|
DefaultTable(ListFactoryIfc<RecordIfc> listFactory)
This constructor uses listFactory to create a
List to hold tables that are logically part of a repo. |
|
DefaultTable(RecordFactoryIfc recordFactory,
ListFactoryIfc<RecordIfc> listFactory,
java.lang.String tableName)
This constructor sets the table name and uses listFactory to
create a List to hold records that are part of a table. |
|
DefaultTable(java.lang.String repoName)
This constructor sets the repo name and uses a UnsynchronizedLinkedListFactory as
the list factory. |
|
| Method Summary | |
|---|---|
void |
addRecord(RecordIfc record)
Add a record. |
void |
close()
This method will close a table. |
RecordIfc |
createRecord()
|
java.util.List<RecordIfc> |
getRecords()
Return the collection of records. |
java.lang.String |
getTableName()
Return the name of the table. |
void |
open()
This method will open an existing table. |
boolean |
removeRecord(RecordIfc record)
Remove record. |
void |
removeRecords()
This method will force the removal of all records. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_TABLE_NAME
private final transient org.apache.commons.logging.Log _log
private RecordFactoryIfc _recordFactory
private final java.util.List<RecordIfc> _recordList
private final java.lang.String _tableName
| Constructor Detail |
|---|
public DefaultTable(RecordFactoryIfc recordFactory,
ListFactoryIfc<RecordIfc> listFactory,
java.lang.String tableName)
listFactory to
create a List to hold records that are part of a table.
listFactory - Used to create a list to hold associated records.tableName - The name of this table.public DefaultTable(ListFactoryIfc<RecordIfc> listFactory)
listFactory to create a
List to hold tables that are logically part of a repo. The
repo name is set to DEFAULT_TABLE_NAME
listFactory - Used to create a list to hold associated tables.public DefaultTable(java.lang.String repoName)
UnsynchronizedLinkedListFactory as
the list factory.
repoName - The name of this repo.public DefaultTable()
DEFAULT_TABLE_NAME and
uses a
UnsynchronizedLinkedListFactory as
the list factory.
| Method Detail |
|---|
public RecordIfc createRecord()
createRecord in interface TableIfcpublic java.lang.String getTableName()
getTableName in interface TableIfc
public void open()
throws OpenException
open in interface TableIfcOpenException - If a problem arose opening the table.
public void close()
throws CloseException
close in interface TableIfcCloseException - If a problem arose closing the table.
public void addRecord(RecordIfc record)
throws AddException
addRecord in interface TableIfcrecord - The record to add.
AddException - if any issues arise adding record.
public void removeRecords()
throws RemoveException
removeRecords in interface TableIfcRemoveException - if a problem arose removing all records.
public boolean removeRecord(RecordIfc record)
throws RemoveException
record.
removeRecord in interface TableIfcrecord - The record to remove.
RemoveException - if any issues arise removing record.public java.util.List<RecordIfc> getRecords()
getRecords in interface TableIfc
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||