Source Code Cross Referenced for Parameters.java in  » Database-ORM » ODAL » com » completex » objective » components » persistency » 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 » Database ORM » ODAL » com.completex.objective.components.persistency 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         *  Objective Database Abstraction Layer (ODAL)
003:         *  Copyright (c) 2004, The ODAL Development Group
004:         *  All rights reserved.
005:         *  For definition of the ODAL Development Group please refer to LICENCE.txt file
006:         *
007:         *  Distributable under LGPL license.
008:         *  See terms of license at gnu.org.
009:         */package com.completex.objective.components.persistency;
010:
011:        import java.util.ArrayList;
012:
013:        /**
014:         * Parameter collection
015:         *
016:         * @author Gennady Krizhevsky
017:         * @see Parameter
018:         */
019:        public class Parameters extends AbstractParameters {
020:
021:            public Parameters() {
022:            }
023:
024:            /**
025:             * @see AbstractParameters#AbstractParameters(int)
026:             */
027:            public Parameters(int capacity) {
028:                super (capacity);
029:            }
030:
031:            /**
032:             * Constructs Parameters from array of values.
033:             * If the array element is of Parameter type it is simply added,
034:             * ff not then new parameter with null column type gets created and added to this collection.
035:             *
036:             * @param parameters
037:             */
038:            public Parameters(Object[] parameters) {
039:                if (parameters == null) {
040:                    this .parameters = new ArrayList();
041:                } else {
042:                    this .parameters = new ArrayList(parameters.length);
043:                    for (int i = 0; i < parameters.length; i++) {
044:                        add(parameters[i]);
045:                    }
046:                }
047:            }
048:
049:            /**
050:             * Constructs new parameters collection from Parameter []
051:             *
052:             * @param parameters Parameter []
053:             */
054:            public Parameters(Parameter[] parameters) {
055:                super (parameters);
056:            }
057:
058:            /**
059:             * @see AbstractParameters#AbstractParameters(AbstractParameters)
060:             */
061:            public Parameters(Parameters parameters) {
062:                super (parameters);
063:            }
064:
065:            /**
066:             * @see AbstractParameters#addAll(AbstractParameters)
067:             */
068:            public void addAll(Parameters argParameters) {
069:                super .addAll(argParameters);
070:            }
071:
072:            /**
073:             * Appends all of the parameters in the specified argParameters to the end of
074:             * this collection
075:             *
076:             * @param argParameters the parameters to be inserted into this collection.
077:             */
078:            public void addAll(Object[] argParameters) {
079:                if (argParameters != null) {
080:                    for (int i = 0; i < argParameters.length; i++) {
081:                        add(argParameters[i]);
082:                    }
083:                }
084:            }
085:
086:            /**
087:             * Inserts all of the elements in the specified Collection into this
088:             * collection, starting at the specified position.  Shifts the element
089:             * currently at that position (if any) and any subsequent elements to
090:             * the right (increases their indices).
091:             *
092:             * @param index         index at which to insert first element
093:             *                      from the specified collection.
094:             * @param argParameters the parameters to be inserted into this collection.
095:             */
096:            public void addAll(int index, Parameters argParameters) {
097:                parameters.addAll(index, argParameters.parameters);
098:            }
099:
100:            /**
101:             * <p> Appends value to end of this collection.
102:             *
103:             * @param type  type column type of the field this parameter corresponds to
104:             * @param value value of this parameter or instance of Parameter class.
105:             * @return added Parameter
106:             * @throws OdalRuntimePersistencyException
107:             *          if the value is already of Parameter type and type != null
108:             */
109:            public Parameter add(ColumnType type, Object value) {
110:                if (type == null) {
111:                    return add(value);
112:                } else {
113:                    assertValueNotParameter(value);
114:                    return add0(type, value);
115:                }
116:            }
117:
118:            /**
119:             * <p> Appends value to parameter collection. If value is of Parameter class - adds it,
120:             * otherwise - creates new Parameter with null type and adds it to the end of this collection.
121:             *
122:             * @param value value of this parameter.
123:             * @return added Parameter or value if it is of Parameter class
124:             */
125:            public Parameter add(Object value) {
126:                Parameter parameter;
127:                if (value instanceof  Parameter) {
128:                    parameters.add(value);
129:                    parameter = (Parameter) value;
130:                } else {
131:                    parameter = add0(null, value);
132:                }
133:                return parameter;
134:            }
135:
136:            /**
137:             * <p> Appends value to end of this collection.
138:             *
139:             * @param type  type column type of the field this parameter corresponds to
140:             * @param value value of this parameter.
141:             * @return added Parameter
142:             */
143:            protected Parameter add0(ColumnType type, Object value) {
144:                Parameter parameter = createParameter(type, value);
145:                parameters.add(parameter);
146:                return parameter;
147:            }
148:
149:            /**
150:             * Factory method
151:             *
152:             * @param type  type column type of the field this parameter corresponds to
153:             * @param value value of this parameter.
154:             * @return new Parameter
155:             */
156:            protected Parameter createParameter(ColumnType type, Object value) {
157:                return new Parameter(type, value);
158:            }
159:
160:            public String toString() {
161:                return super.toString();
162:            }
163:
164:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.