|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteasik.sketch.vertex.SketchVertex
easik.sketch.vertex.EntityNode
public class EntityNode
An entity node represents a table in a database. It has a name, attributes, and unique keys. This class keeps track of all these elements.
| Field Summary | |
|---|---|
private java.util.ArrayList<EntityAttribute> |
_entityAttributes
List of all attributes for this entity |
private javax.swing.tree.DefaultMutableTreeNode |
_entityNode
Node representing this entity for the information tree |
private javax.swing.tree.DefaultMutableTreeNode |
_keyNode
Node representing the key for the information tree |
private java.util.ArrayList<UniqueKey> |
_uniqueKeys
List of all unique keys for this entity |
| Fields inherited from class easik.sketch.vertex.SketchVertex |
|---|
_marked, _name, _posX, _posY |
| Constructor Summary | |
|---|---|
EntityNode(java.lang.String nodeName)
Creates a new entity node with the name provided. |
|
EntityNode(java.lang.String nodeName,
int x,
int y)
Creates a new enity node with the name provided. |
|
| Method Summary | |
|---|---|
void |
addAttribute(EntityAttribute inAtt)
Creates a new EntityAttribute and add its to the list of attributes |
void |
addAttribute(java.lang.String inName,
DataType inAttributeType)
Creates a new EntityAttribute and add its to the list of attributes |
void |
addUniqueKey(java.util.ArrayList inAtts,
java.lang.String inName)
Adds a unique key to the list |
void |
addUniqueKey(UniqueKey inKey)
Adds a unique key to the list |
java.util.ArrayList |
getAttributes()
Returns the list of EntityAttributes |
javax.swing.tree.DefaultMutableTreeNode |
getKeyNode()
Returns the tree node used to display unique keys |
javax.swing.tree.DefaultMutableTreeNode |
getNode()
Returns the tree node used to display entity |
java.util.ArrayList |
getUniqueKeys()
Returns an ArrayList of the unique keys |
void |
removeAttribute(EntityAttribute inAttribute)
Removes an attribute from the list |
void |
removeUniqueKey(UniqueKey inKey)
Removes a unique key from the list |
void |
setKeyNode(javax.swing.tree.DefaultMutableTreeNode inNode)
Sets the tree node used to display unique keys |
void |
setNode(javax.swing.tree.DefaultMutableTreeNode inNode)
Sets the tree node used to display entity |
void |
testKeysNode()
Test to see if the keys tree node should be visible or not |
| Methods inherited from class easik.sketch.vertex.SketchVertex |
|---|
getMarked, getName, getX, getY, setMarked, setName, setX, setY, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.util.ArrayList<EntityAttribute> _entityAttributes
private java.util.ArrayList<UniqueKey> _uniqueKeys
private javax.swing.tree.DefaultMutableTreeNode _entityNode
private javax.swing.tree.DefaultMutableTreeNode _keyNode
| Constructor Detail |
|---|
public EntityNode(java.lang.String nodeName)
nodeName - The name of the new node
public EntityNode(java.lang.String nodeName,
int x,
int y)
nodeName - Name of the new nodex - X Coordinate of the new nodey - Y Coordinate of the new node| Method Detail |
|---|
public void addAttribute(java.lang.String inName,
DataType inAttributeType)
inName - Name of attributeinAttributeType - SQL Type of the attributepublic void addAttribute(EntityAttribute inAtt)
inAtt - The EntityAttribute to add to this EntityNode.public java.util.ArrayList getAttributes()
public void removeAttribute(EntityAttribute inAttribute)
inAttribute - The attribute to be removed
public void addUniqueKey(java.util.ArrayList inAtts,
java.lang.String inName)
inAtts - The attributes used in the keyinName - The name of the unique keypublic void addUniqueKey(UniqueKey inKey)
inKey - The key to be addedpublic void removeUniqueKey(UniqueKey inKey)
inKey - The unique key to be removedpublic java.util.ArrayList getUniqueKeys()
public void setNode(javax.swing.tree.DefaultMutableTreeNode inNode)
inNode - The tree node used to display entitypublic javax.swing.tree.DefaultMutableTreeNode getNode()
public void setKeyNode(javax.swing.tree.DefaultMutableTreeNode inNode)
inNode - The tree node used to display unique keyspublic javax.swing.tree.DefaultMutableTreeNode getKeyNode()
public void testKeysNode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||