|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A database table.
Field Summary | |
static String |
REGULAR_TABLE_TYPE
|
static String |
SYSTEM_TABLE_TYPE
|
Method Summary | |
void |
addColumn(Column col)
Add the given Column to this table. |
void |
addConstraint(Constraint constraint)
|
void |
addIndex(Index index)
Add an index, associating it with a Column , and adding it as a
org.axiondb.TableModificationListener to the table. |
void |
addRow(Row row)
Insert the given Row . |
void |
addTableModificationListener(TableModificationListener listener)
Adds a listener to receive events on this table |
void |
applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids)
Remove the specified rows from this table and any associated indices. |
void |
applyInserts(Collection rows)
Insert the given rows into this table and any associated indices. |
void |
applyUpdates(Collection rows)
Update the given rows in this table and any associated indices. |
void |
drop()
Drop this table from the database. |
void |
freeRowId(int id)
Un-reserve a row id. |
Column |
getColumn(int index)
Return the Column corresponding to the given zero-based index . |
Column |
getColumn(String name)
Return the Column for the given name . |
int |
getColumnCount()
Return the number of Column s I contain. |
Iterator |
getColumnIdentifiers()
Return an Iterator over the ColumnIdentifiers for
my Column s. |
int |
getColumnIndex(String name)
Return the zero-based index of the Column with the given name . |
Iterator |
getConstraints()
|
RowIterator |
getIndexedRows(Selectable where,
boolean readOnly)
|
Index |
getIndexForColumn(Column column)
Return the first Index that pertains to the given Column , or
null if no such Index exists. |
Iterator |
getIndices()
Obtain an Iterator over my indices. |
RowIterator |
getMatchingRows(List selectables,
List values)
Obtain an iterator over my Row s where each
Selectable in the selectable list
evaluates to the corresponding value in the value
list . |
String |
getName()
Get the name of this table. |
int |
getNextRowId()
Reserve a row id. |
int |
getRowCount()
Return the number of Row s I contain. |
RowIterator |
getRowIterator(boolean readOnly)
Obtain an iterator over my Row s. |
String |
getType()
Get the type of this table. |
boolean |
hasColumn(ColumnIdentifier id)
Indicate whether the ColumnIdentifier references a column in this table |
boolean |
hasIndex(String name)
|
boolean |
isColumnIndexed(Column column)
Check to see if an Index exists for the given Column |
boolean |
isPrimaryKeyConstraintExists(String columnName)
check if primary constraint exists on a column |
boolean |
isUniqueConstraintExists(String columnName)
check if unique constraint exists on a column |
RowDecorator |
makeRowDecorator()
|
TransactableTable |
makeTransactableTable()
Create a TransactableTable for this table. |
void |
populateIndex(Index index)
Populate an Index , adding my current rows to it. |
void |
remount(File dir,
boolean dataOnly)
Notify this table that its disk-location has moved. |
void |
removeConstraint(String name)
|
void |
removeIndex(Index index)
Remove an index, both from the indices and as a TableModificationListener |
void |
removeTableModificationListener(TableModificationListener listener)
Removes a listener so that it stops receiving events on this table |
void |
rename(String oldName,
String newName)
|
void |
shutdown()
The database is shutting down, shutdown this table also. |
void |
truncate()
Unconditionally delete all rows in this table. |
void |
updateRow(Row oldrow,
Row newrow)
Update the given Row . |
Methods inherited from interface org.axiondb.RowSource |
getRow |
Field Detail |
public static final String REGULAR_TABLE_TYPE
public static final String SYSTEM_TABLE_TYPE
Method Detail |
public void addColumn(Column col) throws AxionException
Column
to this table.
AxionException
public void addConstraint(Constraint constraint) throws AxionException
AxionException
public void addIndex(Index index) throws AxionException
Column
, and adding it as a
org.axiondb.TableModificationListener
to the table.
index
-
AxionException
addIndex(org.axiondb.Index)
,
addTableModificationListener(org.axiondb.event.TableModificationListener)
,
getIndexForColumn(org.axiondb.Column)
,
isColumnIndexed(org.axiondb.Column)
,
populateIndex(org.axiondb.Index)
public void addRow(Row row) throws AxionException
Row
.
AxionException
public void addTableModificationListener(TableModificationListener listener)
public void applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids) throws AxionException
AxionException
public void applyInserts(Collection rows) throws AxionException
rows
- a collection of Rows
AxionException
public void applyUpdates(Collection rows) throws AxionException
AxionException
public void drop() throws AxionException
AxionException
public void freeRowId(int id)
public Column getColumn(int index)
Column
corresponding to the given zero-based index .
public Column getColumn(String name)
Column
for the given name .
public int getColumnCount()
Column
s I contain.
getColumnCount
in interface RowSource
public Iterator getColumnIdentifiers()
Iterator
over the ColumnIdentifiers
for
my Column
s.
public int getColumnIndex(String name) throws AxionException
Column
with the given name .
getColumnIndex
in interface RowSource
AxionException
public Iterator getConstraints()
public RowIterator getIndexedRows(Selectable where, boolean readOnly) throws AxionException
readOnly
- when true
, the caller does not expect to be able to
modify (i.e., call RowIterator.set(org.axiondb.Row)
or RowIterator.remove()
on)
the returned RowIterator
, the returned iterator may be
unmodifiable.
AxionException
public Index getIndexForColumn(Column column)
Index
that pertains to the given Column
, or
null
if no such Index
exists.
Column
, or null
if no such
Index
existspublic Iterator getIndices()
Iterator
over my indices.
public RowIterator getMatchingRows(List selectables, List values) throws AxionException
iterator
over my Row
s where each
Selectable
in the selectable list
evaluates
to the corresponding value in the value
list
.
This is functionally similiar to executing a SELECT over this table where selectable[i] = value[i] for each value of i . The return RowIterator is not modifiable.
AxionException
public String getName()
public int getNextRowId()
public int getRowCount()
Row
s I contain.
public RowIterator getRowIterator(boolean readOnly) throws AxionException
iterator
over my Row
s.
readOnly
- when true
, the caller does not expect to be able to
modify (i.e., call RowIterator.set(org.axiondb.Row)
or RowIterator.remove()
on)
the returned RowIterator
, the returned iterator may be
unmodifiable.
AxionException
public String getType()
public boolean hasColumn(ColumnIdentifier id)
ColumnIdentifier
references a column in this table
public boolean hasIndex(String name) throws AxionException
AxionException
public boolean isColumnIndexed(Column column)
Index
exists for the given Column
column
- Column
to check
Index
for the given Column
public boolean isPrimaryKeyConstraintExists(String columnName)
public boolean isUniqueConstraintExists(String columnName)
columnName
- name of the columm
public RowDecorator makeRowDecorator()
makeRowDecorator
in interface RowSource
public TransactableTable makeTransactableTable()
TransactableTable
for this table.
public void populateIndex(Index index) throws AxionException
Index
, adding my current rows to it. Does not
add
the index.
index
-
AxionException
addIndex(org.axiondb.Index)
public void remount(File dir, boolean dataOnly) throws AxionException
AxionException
public void removeConstraint(String name)
public void removeIndex(Index index) throws AxionException
index
-
AxionException
public void removeTableModificationListener(TableModificationListener listener)
public void rename(String oldName, String newName) throws AxionException
AxionException
public void shutdown() throws AxionException
AxionException
public void truncate() throws AxionException
AxionException
public void updateRow(Row oldrow, Row newrow) throws AxionException
Row
.
AxionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |