Source Code Cross Referenced for DatabaseFieldModel.java in  » XML-UI » XUI » net » xoetrope » optional » data » sql » 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 » XML UI » XUI » net.xoetrope.optional.data.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.xoetrope.optional.data.sql;
002:
003:        import net.xoetrope.xui.data.XModel;
004:
005:        /**
006:         * A model node wrapping a database field value.
007:         * <p>Copyright (c) Xoetrope Ltd. 2001-2003</p>
008:         * $Revision: 1.1 $
009:         */
010:        public class DatabaseFieldModel extends XModel {
011:            protected int rowIdx;
012:            protected int fieldIdx;
013:            protected DatabaseTableModel xtable;
014:
015:            public DatabaseFieldModel() {
016:            }
017:
018:            public DatabaseFieldModel(DatabaseTableModel table, int row,
019:                    int field) {
020:                setCellReference(table, row, field);
021:            }
022:
023:            public DatabaseTableModel getTable() {
024:                return xtable;
025:            }
026:
027:            public int getFieldIndex() {
028:                return fieldIdx;
029:            }
030:
031:            public void setCellReference(DatabaseTableModel table, int row,
032:                    int field) {
033:                xtable = table;
034:                rowIdx = row;
035:                fieldIdx = field;
036:            }
037:
038:            public void append(XModel newObject) {
039:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
040:            }
041:
042:            public double getValueAsDouble(String elementName) {
043:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
044:                throw new java.lang.UnsupportedOperationException(
045:                        "Method getValueAsDouble() not yet implemented.");
046:            }
047:
048:            public String getValue() {
049:                return xtable.getFieldValue(rowIdx, fieldIdx);
050:            }
051:
052:            public Object getAttribValue(int i) {
053:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
054:                throw new java.lang.UnsupportedOperationException(
055:                        "Method getAttribValue() not yet implemented.");
056:            }
057:
058:            public String getAttribValueAsString(int i) {
059:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
060:                throw new java.lang.UnsupportedOperationException(
061:                        "Method getAttribValueAsString() not yet implemented.");
062:            }
063:
064:            /**
065:             * Gets the value attribute of the specified node as a string.
066:             * @param elementName
067:             * @return the value as a string
068:             */
069:            public String getValueAsString(String elementName) {
070:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
071:                throw new java.lang.UnsupportedOperationException(
072:                        "Method getValueAsString() not yet implemented.");
073:            }
074:
075:            public String getId() {
076:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
077:                throw new java.lang.UnsupportedOperationException(
078:                        "Method getName() not yet implemented.");
079:            }
080:
081:            public String getAttribName(int i) {
082:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
083:                throw new java.lang.UnsupportedOperationException(
084:                        "Method getAttribName() not yet implemented.");
085:            }
086:
087:            public int getAttribute(String attribName) {
088:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
089:                throw new java.lang.UnsupportedOperationException(
090:                        "Method getAttribute() not yet implemented.");
091:            }
092:
093:            public void set(String attribName, Object newObject) {
094:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
095:            }
096:
097:            public void set(Object s) {
098:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
099:                fireModelUpdated();
100:            }
101:
102:            public void remove(XModel model) {
103:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
104:            }
105:
106:            public XModel get(int i) {
107:                return null;
108:            }
109:
110:            public Object append(String id) {
111:                return null;
112:            }
113:
114:            /**
115:             * Gets the model element tag name, e.g. 'Component' from the XML fragment
116:             * <Component ....
117:             * @return the model element name
118:             */
119:            public String getTagName() {
120:                return "";
121:            }
122:
123:            public Object get() {
124:                return xtable.getFieldValue(rowIdx, fieldIdx);
125:            }
126:
127:            public int getValueAsInt(String elementName) {
128:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
129:                throw new java.lang.UnsupportedOperationException(
130:                        "Method getValueAsInt() not yet implemented.");
131:            }
132:
133:            public void setAttribValue(int i, Object value) {
134:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
135:            }
136:
137:            public void setAttribValue(int i, String attribName, Object value) {
138:                /**@todo Implement this net.xoetrope.xui.data.XModel abstract method*/
139:            }
140:
141:            public int hashCode() {
142:                return rowIdx * 10000 + fieldIdx;
143:            }
144:
145:            /**
146:             * @param i The index of the attributeValues array whose value we want
147:             * @return The int value of the attributeValues array at position i
148:             */
149:            public int getAttribValueAsInt(int i) {
150:                return new Integer(xtable.getFieldValue(0, fieldIdx))
151:                        .intValue();
152:            }
153:
154:            /**
155:             * @param i The index of the attributeValues array whose value we want
156:             * @return The int value of the attributeValues array at position i
157:             */
158:            public double getAttribValueAsDouble(int i) {
159:                return new Double(xtable.getFieldValue(0, fieldIdx))
160:                        .doubleValue();
161:            }
162:
163:            public String toString() {
164:                return (String) get();
165:            }
166:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.