|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.dbtools.DBFactoryTree
public class DBFactoryTree
DBFactoryTree
provides an SQL table dependency tree. Instances
of DBFactoryTree
are nodes in this tree.
Method Summary | |
---|---|
void |
addChild(DBFactoryTree dbFactNode)
Adds the specified node as a child of this node |
DBFactoryTree[] |
getChildren()
Gets an array of children for this node |
DBFactory<? extends DBRecord> |
getDBFactory()
Gets the defined DBFactory for this node |
static DBFactoryTree[] |
getDBFactoryTree(DBFactory<? extends DBRecord> initialFactory)
Returns an array of root DBFactoryTree nodes based on the specified top-level DBFactory. |
static DBFactoryTree[] |
getDBFactoryTree(DBFactory<? extends DBRecord>[] initialFactories)
Returns an array of root DBFactoryTree nodes based on the specified top-level DBFactory. |
DBRecord |
getDBRecord()
Gets the DBRecord for this node |
DBField |
getField(java.lang.String name)
Gets the DBField for the specified field name |
DBField[] |
getFields()
Gets the fields for the DBFactory of this node |
DBField[] |
getKeyFields()
Gets the primary key fields for the DBFactory of this node |
java.util.Map<DBField,java.lang.Object> |
getKeyMap()
Returns an OrderedMap of defined primary keys |
java.lang.String[] |
getKeyNames()
Returns the primary key field names for the DBFactory of this node |
int |
getLevel()
Gets the tree level |
java.lang.String |
getName()
Gets the table name for the DBFactory (if defined) |
DBFactoryTree |
getParentNode()
Gets the parent DBFactoryTree node |
java.lang.String |
getUntranslatedTableName()
Gets the table name for the defined DBFactory |
boolean |
hasChildren()
Returns true if this node has children |
boolean |
hasDBFactory()
Returns true if this node has a defined DBFactory |
boolean |
hasDBRecord()
Returns true if a DBRecord is defined for this node |
boolean |
hasParentDBRecord()
Returns true if the parent of this node has a defined DBRecord |
boolean |
isEditable()
Returns true if the DBFactory table is editable |
boolean |
setDBRecord(DBRecord<?> record)
Sets the DBRecord for this node |
void |
setParentNode(DBFactoryTree parent)
Sets the parent DBFactoryTree node |
java.lang.String |
toString()
Gets the String representation of this class (typically the DBFactory table name) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int getLevel()
public void setParentNode(DBFactoryTree parent)
parent
- The parent nodepublic DBFactoryTree getParentNode()
public boolean hasParentDBRecord()
public boolean hasDBFactory()
public DBFactory<? extends DBRecord> getDBFactory()
public boolean isEditable()
public DBField[] getFields()
public DBField[] getKeyFields()
public java.lang.String[] getKeyNames()
public DBField getField(java.lang.String name)
name
- The name of the field to retrieve
public boolean hasDBRecord()
public DBRecord getDBRecord()
public boolean setDBRecord(DBRecord<?> record)
record
- The DBRecord to set
public java.lang.String getUntranslatedTableName()
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public void addChild(DBFactoryTree dbFactNode)
dbFactNode
- The node to addpublic boolean hasChildren()
public DBFactoryTree[] getChildren()
public java.util.Map<DBField,java.lang.Object> getKeyMap()
public static DBFactoryTree[] getDBFactoryTree(DBFactory<? extends DBRecord> initialFactory)
initialFactory
- The root DBFactory which is traversed to create the DBFactoryTree. If null
all root DBFactories will be traversed.
public static DBFactoryTree[] getDBFactoryTree(DBFactory<? extends DBRecord>[] initialFactories)
initialFactories
- The root DBFactories which are traversed to create the DBFactoryTree. If null
all root DBFactories will be traversed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |