Java Doc for Entity.java in  » J2EE » jag » com » finalist » jaggenerator » modules » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » jag » com.finalist.jaggenerator.modules 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.tree.DefaultMutableTreeNode
      com.finalist.jaggenerator.modules.Entity

Entity
public class Entity extends DefaultMutableTreeNode implements JagBean,ActionListener(Code)

author:
   hillie


Field Summary
public  javax.swing.JTextFielddisplayNameText
    
public  javax.swing.JComboBoxisAssociationEntity
    
public  javax.swing.JComboBoxisCompositeCombo
    
static  Loglog
    
public  javax.swing.JTextFieldnameText
    
public  javax.swing.JTextFieldpKeyText
    
public  javax.swing.JTextFieldpKeyTypeText
    
public  javax.swing.JTextFieldrootPackageText
    

Constructor Summary
public  Entity(String rootPackage, String tableName, String pKey)
    
public  Entity(Element el)
    

Method Summary
public  voidactionPerformed(ActionEvent e)
    
public  voidaddRelation(Relation relation)
     Inserts a relation in the correct position (relations are always positioned first amongst an Entity's children, because it looks nicer!).
public  intcountPrimaryKeyFields()
     Count the number of primary key fields.
public  EntitygetAssocationEntity(String relationName)
    
public  TemplateStringgetDescription()
    
public  TemplateStringgetDisplayName()
     Display name is used to determine which field to render in drop downl lists.
public  ListgetEntitiesAssocationRelations()
     Get a list of all assocation Relations to this entity.
public  ListgetEntitiesRelations()
     Get a list of all Relations to this entity that are not assocation relations.
public  ListgetFields()
    
public  StringgetFirstPrimaryKeyFieldName()
    
public  SessiongetFirstSession()
     Get a session that contains this Entity.
public  ListgetFkFields()
    
public  booleangetHasRelations()
    
public  StringgetIsAssociationEntity()
    
public  StringgetIsComposite()
    
public  TemplateStringgetLocalTableName()
     Gets the name of the table represented by this Entity.
public  TemplateStringgetName()
    
public  ListgetNonFkFields()
    
public  ListgetNonPkFields()
    
public  ListgetNonPkRelationFields()
     Gets the fields that are neither primary keys, nor a foreign key involved in a container-managed relation.
public  ListgetNonRelationFields()
    
public  JPanelgetPanel()
    
public  ListgetPkFields()
    
public  FieldgetPrimaryKey()
    
public  StringgetPrimaryKeyClass()
    
public  TemplateStringgetPrimaryKeyName()
    
public  TemplateStringgetPrimaryKeyType()
    
public  StringgetRefName()
    
public  ListgetRelatedEntities()
    
public  ListgetRelationFieldNames()
     Gets the set of field names within this entity, which are used as relations to other CMR-related entity beans.
public  ListgetRelations()
    
public  TemplateStringgetRootPackage()
    
public  StringgetRootPath()
    
public  StringgetTableName()
    
public  voidgetXML(Element el)
    
public  booleanisCompositeKey()
     Iterates over all the table columns and determines whether the table has a single key or a composite key.
public  booleanisSequenceEntity()
     Check if one of the fields needs a sequence.
public  voidnotifyRelationsThatConstructionIsFinished()
     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.
public  voidnotifyRelationsThatFieldNameChanged(String oldName, String text)
     When a field name is changed, call this to tell all relations to update their lists.
public  voidsetDescription(String text)
    
public  voidsetDisplayName(String text)
    
public  voidsetIsAssociationEntity(String associationEntity)
    
public  voidsetIsComposite(String composite)
    
public  voidsetName(String text)
    
public  voidsetPKeyType(String pKeyType)
    
public  voidsetPrimaryKey(Field field)
     Called by a field when it has been selected as primary key in the GUI.
public  voidsetRefName(String text)
    
public  voidsetRootPackage(String text)
    
public  voidsetTableName(String table)
    
public  StringtoString()
    
public  voidunsetPrimaryKey(Field field)
     Called by a field when it has been de-selected as primary key in the GUI.

Field Detail
displayNameText
public javax.swing.JTextField displayNameText(Code)



isAssociationEntity
public javax.swing.JComboBox isAssociationEntity(Code)



isCompositeCombo
public javax.swing.JComboBox isCompositeCombo(Code)



log
static Log log(Code)



nameText
public javax.swing.JTextField nameText(Code)



pKeyText
public javax.swing.JTextField pKeyText(Code)



pKeyTypeText
public javax.swing.JTextField pKeyTypeText(Code)



rootPackageText
public javax.swing.JTextField rootPackageText(Code)




Constructor Detail
Entity
public Entity(String rootPackage, String tableName, String pKey)(Code)
Creates new form BeanForm



Entity
public Entity(Element el)(Code)




Method Detail
actionPerformed
public void actionPerformed(ActionEvent e)(Code)



addRelation
public void addRelation(Relation relation)(Code)
Inserts a relation in the correct position (relations are always positioned first amongst an Entity's children, because it looks nicer!).
Parameters:
  relation -



countPrimaryKeyFields
public int countPrimaryKeyFields()(Code)
Count the number of primary key fields. int with the number of primary keys



getAssocationEntity
public Entity getAssocationEntity(String relationName)(Code)
Get the Entity that is associated
Parameters:
  relationName - description



getDescription
public TemplateString getDescription()(Code)



getDisplayName
public TemplateString getDisplayName()(Code)
Display name is used to determine which field to render in drop downl lists. if not set, the primary key is used. the name of the field to use to display an entity in a dropdown list.



getEntitiesAssocationRelations
public List getEntitiesAssocationRelations()(Code)
Get a list of all assocation Relations to this entity. list with relations.



getEntitiesRelations
public List getEntitiesRelations()(Code)
Get a list of all Relations to this entity that are not assocation relations. list with non-assocation relations.



getFields
public List getFields()(Code)



getFirstPrimaryKeyFieldName
public String getFirstPrimaryKeyFieldName()(Code)
Returns the First primary key field the field name of the first primary key field or an empty string if nothing was found.



getFirstSession
public Session getFirstSession()(Code)
Get a session that contains this Entity. Session



getFkFields
public List getFkFields()(Code)



getHasRelations
public boolean getHasRelations()(Code)



getIsAssociationEntity
public String getIsAssociationEntity()(Code)



getIsComposite
public String getIsComposite()(Code)



getLocalTableName
public TemplateString getLocalTableName()(Code)
Gets the name of the table represented by this Entity. the table name.



getName
public TemplateString getName()(Code)



getNonFkFields
public List getNonFkFields()(Code)



getNonPkFields
public List getNonPkFields()(Code)



getNonPkRelationFields
public List getNonPkRelationFields()(Code)
Gets the fields that are neither primary keys, nor a foreign key involved in a container-managed relation. List



getNonRelationFields
public List getNonRelationFields()(Code)



getPanel
public JPanel getPanel()(Code)



getPkFields
public List getPkFields()(Code)



getPrimaryKey
public Field getPrimaryKey()(Code)



getPrimaryKeyClass
public String getPrimaryKeyClass()(Code)
Returns the class that represents the primary key type the class that represents the primary key type



getPrimaryKeyName
public TemplateString getPrimaryKeyName()(Code)



getPrimaryKeyType
public TemplateString getPrimaryKeyType()(Code)



getRefName
public String getRefName()(Code)



getRelatedEntities
public List getRelatedEntities()(Code)



getRelationFieldNames
public List getRelationFieldNames()(Code)
Gets the set of field names within this entity, which are used as relations to other CMR-related entity beans. a Set of TemplateString objects.



getRelations
public List getRelations()(Code)



getRootPackage
public TemplateString getRootPackage()(Code)



getRootPath
public String getRootPath()(Code)



getTableName
public String getTableName()(Code)



getXML
public void getXML(Element el) throws ParserConfigurationException(Code)



isCompositeKey
public boolean isCompositeKey()(Code)
Iterates over all the table columns and determines whether the table has a single key or a composite key. The key is said to be composite when more than one column is part of the key. true only when more the table has a composite key else false



isSequenceEntity
public boolean isSequenceEntity()(Code)
Check if one of the fields needs a sequence. If so, return true. true if a sequence is needed.



notifyRelationsThatConstructionIsFinished
public void notifyRelationsThatConstructionIsFinished()(Code)
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. Call this method when the Entity is ready.



notifyRelationsThatFieldNameChanged
public void notifyRelationsThatFieldNameChanged(String oldName, String text)(Code)
When a field name is changed, call this to tell all relations to update their lists.
Parameters:
  oldName -
Parameters:
  text -



setDescription
public void setDescription(String text)(Code)



setDisplayName
public void setDisplayName(String text)(Code)



setIsAssociationEntity
public void setIsAssociationEntity(String associationEntity)(Code)



setIsComposite
public void setIsComposite(String composite)(Code)



setName
public void setName(String text)(Code)



setPKeyType
public void setPKeyType(String pKeyType)(Code)



setPrimaryKey
public void setPrimaryKey(Field field)(Code)
Called by a field when it has been selected as primary key in the GUI.
Parameters:
  field -



setRefName
public void setRefName(String text)(Code)



setRootPackage
public void setRootPackage(String text)(Code)



setTableName
public void setTableName(String table)(Code)



toString
public String toString()(Code)



unsetPrimaryKey
public void unsetPrimaryKey(Field field)(Code)
Called by a field when it has been de-selected as primary key in the GUI.
Parameters:
  field -



Fields inherited from javax.swing.tree.DefaultMutableTreeNode
final public static Enumeration<TreeNode> EMPTY_ENUMERATION(Code)(Java Doc)
protected boolean allowsChildren(Code)(Java Doc)
protected Vector children(Code)(Java Doc)
protected MutableTreeNode parent(Code)(Java Doc)
protected transient Object userObject(Code)(Java Doc)

Methods inherited from javax.swing.tree.DefaultMutableTreeNode
public void add(MutableTreeNode newChild)(Code)(Java Doc)
public Enumeration breadthFirstEnumeration()(Code)(Java Doc)
public Enumeration children()(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public Enumeration depthFirstEnumeration()(Code)(Java Doc)
public boolean getAllowsChildren()(Code)(Java Doc)
public TreeNode getChildAfter(TreeNode aChild)(Code)(Java Doc)
public TreeNode getChildAt(int index)(Code)(Java Doc)
public TreeNode getChildBefore(TreeNode aChild)(Code)(Java Doc)
public int getChildCount()(Code)(Java Doc)
public int getDepth()(Code)(Java Doc)
public TreeNode getFirstChild()(Code)(Java Doc)
public DefaultMutableTreeNode getFirstLeaf()(Code)(Java Doc)
public int getIndex(TreeNode aChild)(Code)(Java Doc)
public TreeNode getLastChild()(Code)(Java Doc)
public DefaultMutableTreeNode getLastLeaf()(Code)(Java Doc)
public int getLeafCount()(Code)(Java Doc)
public int getLevel()(Code)(Java Doc)
public DefaultMutableTreeNode getNextLeaf()(Code)(Java Doc)
public DefaultMutableTreeNode getNextNode()(Code)(Java Doc)
public DefaultMutableTreeNode getNextSibling()(Code)(Java Doc)
public TreeNode getParent()(Code)(Java Doc)
public TreeNode[] getPath()(Code)(Java Doc)
protected TreeNode[] getPathToRoot(TreeNode aNode, int depth)(Code)(Java Doc)
public DefaultMutableTreeNode getPreviousLeaf()(Code)(Java Doc)
public DefaultMutableTreeNode getPreviousNode()(Code)(Java Doc)
public DefaultMutableTreeNode getPreviousSibling()(Code)(Java Doc)
public TreeNode getRoot()(Code)(Java Doc)
public TreeNode getSharedAncestor(DefaultMutableTreeNode aNode)(Code)(Java Doc)
public int getSiblingCount()(Code)(Java Doc)
public Object getUserObject()(Code)(Java Doc)
public Object[] getUserObjectPath()(Code)(Java Doc)
public void insert(MutableTreeNode newChild, int childIndex)(Code)(Java Doc)
public boolean isLeaf()(Code)(Java Doc)
public boolean isNodeAncestor(TreeNode anotherNode)(Code)(Java Doc)
public boolean isNodeChild(TreeNode aNode)(Code)(Java Doc)
public boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)(Code)(Java Doc)
public boolean isNodeRelated(DefaultMutableTreeNode aNode)(Code)(Java Doc)
public boolean isNodeSibling(TreeNode anotherNode)(Code)(Java Doc)
public boolean isRoot()(Code)(Java Doc)
public Enumeration pathFromAncestorEnumeration(TreeNode ancestor)(Code)(Java Doc)
public Enumeration postorderEnumeration()(Code)(Java Doc)
public Enumeration preorderEnumeration()(Code)(Java Doc)
public void remove(int childIndex)(Code)(Java Doc)
public void remove(MutableTreeNode aChild)(Code)(Java Doc)
public void removeAllChildren()(Code)(Java Doc)
public void removeFromParent()(Code)(Java Doc)
public void setAllowsChildren(boolean allows)(Code)(Java Doc)
public void setParent(MutableTreeNode newParent)(Code)(Java Doc)
public void setUserObject(Object userObject)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.