Source Code Cross Referenced for RelationalEntityTableUserObject.java in  » UML » MetaBoss » com » metaboss » applications » designstudio » userobjects » 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 » UML » MetaBoss » com.metaboss.applications.designstudio.userobjects 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
002:        // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
003:        // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
004:        // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
005:        // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
006:        // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
007:        // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
008:        // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
009:        // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
010:        // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
011:        // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
012:        // POSSIBILITY OF SUCH DAMAGE.
013:        //
014:        // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
015:        package com.metaboss.applications.designstudio.userobjects;
016:
017:        import java.awt.event.ActionEvent;
018:        import java.util.ArrayList;
019:
020:        import com.metaboss.applications.designstudio.Application;
021:        import com.metaboss.applications.designstudio.BaseAction;
022:        import com.metaboss.applications.designstudio.BasePropertiesDialog;
023:        import com.metaboss.applications.designstudio.BaseUserObject;
024:        import com.metaboss.applications.designstudio.components.SeparatorAction;
025:        import com.metaboss.applications.designstudio.propertiesdialogs.RelationalEntityTablePropertiesDialog;
026:        import com.metaboss.applications.designstudio.propertiesview.PropertiesTableModel;
027:        import com.metaboss.sdlctools.models.metabossmodel.MetaBossModelPackage;
028:        import com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.systemimplementationmodel.domainimplementationmodel.DomainRelationalStorageDefinition;
029:        import com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.systemimplementationmodel.domainimplementationmodel.RelationalEntityTable;
030:        import com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.systemimplementationmodel.domainimplementationmodel.RelationalEntityTableClass;
031:
032:        /*		RelationalEntityTable user object class		*/
033:
034:        public class RelationalEntityTableUserObject extends BaseUserObject {
035:            public static final int ADD_REFERENCECOLUMN = 1;
036:            public static final int ADD_ATTRIBUTECOLUMN = 2;
037:
038:            private RelationalEntityTable mRelationalEntityTable = null;
039:            private AttributeColumnAction mAttributeColumnAction = new AttributeColumnAction();
040:            private ReferenceColumnAction mReferenceColumnAction = new ReferenceColumnAction();
041:
042:            public RelationalEntityTableUserObject(
043:                    RelationalEntityTable pRelationalEntityTable) {
044:                super (pRelationalEntityTable, Application.ENTITYTABLE_ICON);
045:                mRelationalEntityTable = pRelationalEntityTable;
046:            }
047:
048:            public RelationalEntityTableUserObject(
049:                    RelationalEntityTable pRelationalEntityTable,
050:                    String pCaption, int pMode) {
051:                super (pRelationalEntityTable, pCaption, pMode);
052:                mRelationalEntityTable = pRelationalEntityTable;
053:            }
054:
055:            public BaseUserObject createNewObject(MetaBossModelPackage pPackage) {
056:                RelationalEntityTableClass lClass = pPackage
057:                        .getEnterpriseModel().getSystemImplementationModel()
058:                        .getDomainImplementationModel()
059:                        .getRelationalEntityTable();
060:                return new RelationalEntityTableUserObject(lClass
061:                        .createRelationalEntityTable());
062:            }
063:
064:            public static void addNewEntityTable(
065:                    DomainRelationalStorageDefinition pStorageDefinition)
066:                    throws Exception {
067:                new RelationalEntityTableUserObject(null).addNewObject(
068:                        getObjectPackage(pStorageDefinition),
069:                        pStorageDefinition.getEntityTables());
070:            }
071:
072:            // return object root node captions
073:            public String getRootNodeName() {
074:                return Application.getString("entitytables_node");
075:            }
076:
077:            // load object properties into grid control
078:            public void loadObjectProperties(PropertiesTableModel pModel)
079:                    throws Exception {
080:                super .loadObjectProperties(pModel);
081:                if (pModel == null || mRelationalEntityTable == null)
082:                    return;
083:
084:                addModelElement(pModel, "Entity", mRelationalEntityTable
085:                        .getEntity());
086:                pModel.AddProperty("Instance Id Column Name Override",
087:                        mRelationalEntityTable
088:                                .getInstanceIdColumnNameOverride());
089:                pModel.AddProperty("Instance Id Column Name Suggestion",
090:                        mRelationalEntityTable
091:                                .getInstanceIdColumnNameSuggestion());
092:                pModel.AddProperty("Name Override", mRelationalEntityTable
093:                        .getNameOverride());
094:                pModel.AddProperty("Name Suggestion", mRelationalEntityTable
095:                        .getNameSuggestion());
096:                pModel.AddProperty(
097:                        "Natural Primary Key Constraint Name Override",
098:                        mRelationalEntityTable
099:                                .getNaturalPrimaryKeyConstraintNameOverride());
100:                pModel
101:                        .AddProperty(
102:                                "Natural Primary Key Constraint Name Suggestion",
103:                                mRelationalEntityTable
104:                                        .getNaturalPrimaryKeyConstraintNameSuggestion());
105:                pModel.AddProperty("Primary Key Constraint Name Override",
106:                        mRelationalEntityTable
107:                                .getPrimaryKeyConstraintNameOverride());
108:                pModel.AddProperty("Primary Key Constraint Name Suggestion",
109:                        mRelationalEntityTable
110:                                .getPrimaryKeyConstraintNameSuggestion());
111:                pModel.AddProperty("State Column Name Override",
112:                        mRelationalEntityTable.getStateColumnNameOverride());
113:                pModel.AddProperty("State Column Name Suggestion",
114:                        mRelationalEntityTable.getStateColumnNameSuggestion());
115:                pModel.AddProperty(
116:                        "State Referential Constraint Name Override",
117:                        mRelationalEntityTable
118:                                .getStateReferentialConstraintNameOverride());
119:                pModel.AddProperty(
120:                        "State Referential Constraint Name Suggestion",
121:                        mRelationalEntityTable
122:                                .getStateReferentialConstraintNameSuggestion());
123:                pModel.AddProperty("Table Alias", mRelationalEntityTable
124:                        .getTableAlias());
125:                pModel
126:                        .AddProperty("Version Id Column Name Override",
127:                                mRelationalEntityTable
128:                                        .getVersionIdColumnNameOverride());
129:                pModel.AddProperty("Version Id Column Name Suggestion",
130:                        mRelationalEntityTable
131:                                .getVersionIdColumnNameSuggestion());
132:                pModel.AddProperty("Has Natural Primary Key",
133:                        boolToString(mRelationalEntityTable
134:                                .isHasNaturalPrimaryKey()));
135:                pModel
136:                        .AddProperty("Has State Column",
137:                                boolToString(mRelationalEntityTable
138:                                        .isHasStateColumn()));
139:                pModel.AddProperty("Has Version Id Column",
140:                        boolToString(mRelationalEntityTable
141:                                .isHasVersionIdColumn()));
142:            }
143:
144:            public BasePropertiesDialog getObjectEditor() {
145:                return new RelationalEntityTablePropertiesDialog();
146:            }
147:
148:            public void fillActionsList(ArrayList pList) {
149:                switch (mMode) {
150:                case ALL_ACTIONS:
151:                    super .fillActionsList(pList);
152:                    pList.add(new SeparatorAction());
153:                    pList.add(mAttributeColumnAction);
154:                    pList.add(mReferenceColumnAction);
155:                    break;
156:                case ADD_ATTRIBUTECOLUMN:
157:                    pList.add(mAttributeColumnAction);
158:                    break;
159:                case ADD_REFERENCECOLUMN:
160:                    pList.add(mReferenceColumnAction);
161:                    break;
162:                }
163:            }
164:
165:            private void addAttributeColumn() {
166:                try {
167:                    RelationalEntityTableAttributeColumnUserObject
168:                            .addNewAttributeColumn(mRelationalEntityTable);
169:                } catch (Exception e) {
170:                    Application.processError(e);
171:                }
172:            }
173:
174:            private void addReferenceColumn() {
175:                try {
176:                    RelationalEntityTableReferenceColumnUserObject
177:                            .addNewReferenceColumn(mRelationalEntityTable);
178:                } catch (Exception e) {
179:                    Application.processError(e);
180:                }
181:            }
182:
183:            /*		Actions		*/
184:
185:            public class ReferenceColumnAction extends BaseAction {
186:                public ReferenceColumnAction() {
187:                    super ("Add New Reference Column", Application
188:                            .getAddIcon(Application.FIELDS_ICON));
189:                }
190:
191:                public void actionPerformed(ActionEvent arg0) {
192:                    addReferenceColumn();
193:                }
194:            }
195:
196:            public class AttributeColumnAction extends BaseAction {
197:                public AttributeColumnAction() {
198:                    super ("Add New Attribute Column", Application
199:                            .getAddIcon(Application.ATTRIBUTECOLUMN_ICON));
200:                }
201:
202:                public void actionPerformed(ActionEvent arg0) {
203:                    addAttributeColumn();
204:                }
205:            }
206:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.