|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.SQLObject
ca.sqlpower.architect.SQLTable.Folder<T>
public static class SQLTable.Folder<T extends SQLObject>
The Folder class is a SQLObject that holds a SQLTable's child folders (columns and relationships).
| Field Summary | |
|---|---|
static int |
COLUMNS
|
static int |
EXPORTED_KEYS
|
static int |
IMPORTED_KEYS
|
static int |
INDICES
|
protected java.lang.String |
name
|
protected SQLTable |
parent
|
protected int |
type
|
| Fields inherited from class ca.sqlpower.architect.SQLObject |
|---|
children, magicDisableCount, populated, undoEventListeners |
| Constructor Summary | |
|---|---|
SQLTable.Folder(int type,
boolean populated)
|
|
| Method Summary | |
|---|---|
protected void |
addChildImpl(int index,
SQLObject child)
All other addChild() methods call this one. |
boolean |
allowsChildren()
Returns true if and only if this object can have child SQLObjects. |
java.util.List |
getChildren(java.sql.DatabaseMetaData dbmd)
Returns an unmodifiable view of the child list. |
java.lang.Class<? extends SQLObject> |
getChildType()
|
java.lang.String |
getName()
This is the name of the object. |
SQLTable |
getParent()
Returns the parent of this SQLObject or null if it
is a root object such as SQLDatabase. |
java.lang.String |
getShortDisplayName()
Returns a short string that should be displayed to the user for representing this SQLObject as a label. |
int |
getType()
Returns the type code of this folder. |
void |
populate()
Causes this SQLObject to load its children (if any exist). |
void |
populate(java.sql.DatabaseMetaData dbmd)
|
protected SQLObject |
removeImpl(int index)
Overrides default remove behaviour to normalize the primary key in the case of a removed SQLColumn and to check for locked (imported) columns. |
void |
setName(java.lang.String n)
Sets the value of sql object name |
protected void |
setParent(SQLObject newParentTable)
Sets the parent reference in this folder. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int type
protected java.lang.String name
protected SQLTable parent
public static final int COLUMNS
public static final int IMPORTED_KEYS
public static final int EXPORTED_KEYS
public static final int INDICES
| Constructor Detail |
|---|
public SQLTable.Folder(int type,
boolean populated)
| Method Detail |
|---|
public java.lang.String getName()
SQLObject
getName in class SQLObjectpublic void setName(java.lang.String n)
SQLObject
setName in class SQLObjectn - Value to assign to this.namepublic SQLTable getParent()
SQLObjectnull if it
is a root object such as SQLDatabase.
getParent in class SQLObjectprotected void setParent(SQLObject newParentTable)
setParent in class SQLObjectjava.lang.ClassCastException - if newParent is not an instance of SQLTable.
public void populate()
throws ArchitectException
SQLObject
populate in class SQLObjectArchitectException
public void populate(java.sql.DatabaseMetaData dbmd)
throws ArchitectException
ArchitectException
protected void addChildImpl(int index,
SQLObject child)
throws ArchitectException
SQLObject
addChildImpl in class SQLObjectindex - The index that the new child will havechild - The new child to add (must be same type as all other children)
ArchitectException - If you try to add a child of a different type than the existing children.protected SQLObject removeImpl(int index)
removeImpl in class SQLObjectLockedColumnException - If this is a folder of columns, and the column you
attempt to remove is "owned" by a relationship.public java.lang.String getShortDisplayName()
SQLObject
getShortDisplayName in class SQLObjectpublic boolean allowsChildren()
SQLObjectreturn true" or
"return false" depending on object type.
allowsChildren in class SQLObjectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getType()
public java.util.List getChildren(java.sql.DatabaseMetaData dbmd)
throws ArchitectException
ArchitectExceptionpublic java.lang.Class<? extends SQLObject> getChildType()
getChildType in class SQLObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||