|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.finalist.jaggenerator.modules.Entity
| Nested Class Summary |
| Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode |
|
| Field Summary | |
javax.swing.JComboBox |
isCompositeCombo
|
(package private) static org.apache.commons.logging.Log |
log
|
javax.swing.JTextField |
nameText
|
javax.swing.JTextField |
pKeyText
|
javax.swing.JTextField |
pKeyTypeText
|
javax.swing.JTextField |
rootPackageText
|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
Entity(org.w3c.dom.Element el)
|
|
Entity(java.lang.String rootPackage,
java.lang.String tableName,
java.lang.String pKey)
Creates new form BeanForm |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addRelation(Relation relation)
Inserts a relation in the correct position (relations are always positioned first amongst an Entity's children, because it looks nicer!). |
int |
countPrimaryKeyFields()
Count the number of primary key fields. |
TemplateString |
getDescription()
|
java.util.List |
getEntitiesRelations()
Get a list of all Relations to this entity. |
java.util.List |
getFields()
|
java.lang.String |
getFirstPrimaryKeyFieldName()
Returns the First primary key field |
java.util.List |
getFkFields()
|
boolean |
getHasRelations()
|
java.lang.String |
getIsComposite()
|
TemplateString |
getLocalTableName()
Gets the name of the table represented by this Entity. |
TemplateString |
getName()
|
java.util.List |
getNonFkFields()
|
java.util.List |
getNonPkFields()
|
java.util.List |
getNonPkRelationFields()
Gets the fields that are neither primary keys, nor a foreign key involved in a container-managed relation. |
java.util.List |
getNonRelationFields()
|
javax.swing.JPanel |
getPanel()
|
java.util.List |
getPkFields()
|
Field |
getPrimaryKey()
|
java.lang.String |
getPrimaryKeyClass()
Returns the class that represents the primary key type |
TemplateString |
getPrimaryKeyName()
|
TemplateString |
getPrimaryKeyType()
|
java.lang.String |
getRefName()
|
java.util.List |
getRelatedEntities()
|
java.util.List |
getRelationFieldNames()
Gets the set of field names within this entity, which are used as relations to other CMR-related entity beans. |
java.util.List |
getRelations()
|
TemplateString |
getRootPackage()
|
java.lang.String |
getRootPath()
|
java.lang.String |
getTableName()
|
void |
getXML(org.w3c.dom.Element el)
|
boolean |
isCompositeKey()
Iterates over all the table columns and determines whether the table has a single key or a composite key. |
void |
notifyRelationsThatConstructionIsFinished()
While an entity is being created, its constituent relations have to wait for the entity to finish being constructed before they can finish initialising themselves. |
void |
notifyRelationsThatFieldNameChanged(java.lang.String oldName,
java.lang.String text)
When a field name is changed, call this to tell all relations to update their lists. |
void |
setDescription(java.lang.String text)
|
void |
setIsComposite(java.lang.String composite)
|
void |
setName(java.lang.String text)
|
void |
setPKeyType(java.lang.String pKeyType)
|
void |
setPrimaryKey(Field field)
Called by a field when it has been selected as primary key in the GUI. |
void |
setRefName(java.lang.String text)
|
void |
setRootPackage(java.lang.String text)
|
void |
setTableName(java.lang.String table)
|
java.lang.String |
toString()
|
void |
unsetPrimaryKey(Field field)
Called by a field when it has been de-selected as primary key in the GUI. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
static org.apache.commons.logging.Log log
public javax.swing.JComboBox isCompositeCombo
public javax.swing.JTextField nameText
public javax.swing.JTextField pKeyText
public javax.swing.JTextField pKeyTypeText
public javax.swing.JTextField rootPackageText
| Constructor Detail |
public Entity(java.lang.String rootPackage,
java.lang.String tableName,
java.lang.String pKey)
public Entity(org.w3c.dom.Element el)
| Method Detail |
public javax.swing.JPanel getPanel()
getPanel in interface JagBeanpublic java.lang.String getRefName()
getRefName in interface JagBeanpublic void setRefName(java.lang.String text)
public void setPKeyType(java.lang.String pKeyType)
public void getXML(org.w3c.dom.Element el)
throws javax.xml.parsers.ParserConfigurationException
getXML in interface JagBeanjavax.xml.parsers.ParserConfigurationExceptionpublic TemplateString getName()
public void setName(java.lang.String text)
public TemplateString getDescription()
public void setDescription(java.lang.String text)
public TemplateString getRootPackage()
public void setRootPackage(java.lang.String text)
public Field getPrimaryKey()
public void setPrimaryKey(Field field)
field - public void unsetPrimaryKey(Field field)
field - public TemplateString getPrimaryKeyType()
public TemplateString getPrimaryKeyName()
public java.lang.String getIsComposite()
public void setIsComposite(java.lang.String composite)
public java.lang.String getRootPath()
public java.util.List getRelations()
public java.util.List getEntitiesRelations()
public java.util.List getRelatedEntities()
public java.util.List getRelationFieldNames()
public boolean getHasRelations()
public java.util.List getFields()
public java.util.List getNonFkFields()
public java.util.List getFkFields()
public java.util.List getNonRelationFields()
public java.util.List getPkFields()
public java.util.List getNonPkFields()
public java.util.List getNonPkRelationFields()
public boolean isCompositeKey()
true only when more the table has a composite key else falsepublic int countPrimaryKeyFields()
int with the number of primary keyspublic java.lang.String getPrimaryKeyClass()
public java.lang.String getFirstPrimaryKeyFieldName()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic TemplateString getLocalTableName()
public void setTableName(java.lang.String table)
public java.lang.String getTableName()
public void notifyRelationsThatConstructionIsFinished()
public void notifyRelationsThatFieldNameChanged(java.lang.String oldName,
java.lang.String text)
oldName - text - public java.lang.String toString()
public void addRelation(Relation relation)
relation -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||