|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fesenmeyer.dbnormalizer.core.AbstractDBItem
de.fesenmeyer.dbnormalizer.core.TableContainer
public class TableContainer
A TableContainer is used to group tables based on the schema or catalog they
are contained in. This class is mainly used by the DBNormalizerSession
and Table
classes. The TableContainer NO_CONTAINER
can be used
as group for tables which are neither contained in a schema nor catalog.
TableContainerType
Field Summary | |
---|---|
static TableContainer |
NO_CONTAINER
The TableContainer to be used for tables neither contained in a catalog nor schema. |
private static String |
NO_CONTAINER_NAME
The name of the container NO_CONTAINER . |
private TableContainerType |
type
The type. |
Constructor Summary | |
---|---|
TableContainer(String name,
TableContainerType type)
Class Constructor specifying name and type. |
Method Summary | |
---|---|
int |
compareTo(TableContainer tableContainer)
Compares this TableContainer to another by comparing type and name. |
boolean |
equals(Object o)
Overridden method, tests if the TableContainer specified by argument o is equal to this TableContainer. |
TableContainerType |
getType()
Gets the type. |
String |
toString()
Overridden method, returns an appropriate string representation of this TableContainer. |
Methods inherited from class de.fesenmeyer.dbnormalizer.core.AbstractDBItem |
---|
getName, setName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private TableContainerType type
private static final String NO_CONTAINER_NAME
NO_CONTAINER
.
public static final TableContainer NO_CONTAINER
Constructor Detail |
---|
public TableContainer(String name, TableContainerType type)
NOTE: For specifying a TableContainer
of type TableContainerType.NONE
the constant NO_CONTAINER
must
be used instead of this constructor, because a name does not make sense
for this type. Otherwise an IllegalArgumentException
will be thrown.
name
- the nametype
- the type
IllegalArgumentException
- if the name argument or type
argument are null, or if type is TableContainerType.NONE
Method Detail |
---|
public TableContainerType getType()
public boolean equals(Object o)
equals
in class Object
o
- an Object, which should be another TableContainer
true
, if the o argument is not null
,
a TableContainer and its type and name is equal to this
TableContainer; false
, otherwisepublic String toString()
toString
in class AbstractDBItem
public int compareTo(TableContainer tableContainer)
compareTo
in interface Comparable<TableContainer>
tableContainer
- another TableContainer.
0
,
if
0
,
if the tables' type and name are both equal.
0
,
if
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |