Source Code Cross Referenced for ResultSetConcurrencyEnum.java in  » Inversion-of-Control » carbon » org » sape » carbon » services » 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 » Inversion of Control » carbon » org.sape.carbon.services.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:/*
002: * The contents of this  file are subject to the Sapient Public License
003: * Version 1.0 (the "License"); you may not use this  file except in compliance
004: * with the License. You may obtain a copy of the License at
005: * http://carbon.sf.net/License.html.
006: *
007: * Software distributed under the License is distributed on an "AS IS" basis,
008: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
009: * the specific language governing rights and limitations under the License.
010: *
011: * The Original Code is The Carbon Component Framework.
012: *
013: * The Initial Developer of the Original Code is Sapient Corporation
014: *
015: * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
016: */
017:
018:package org.sape.carbon.services.sql;
019:
020:
021:import java.io.ObjectStreamException;
022:import java.io.Serializable;
023:import java.sql.ResultSet;
024:import java.util.Iterator;
025:
026:import org.sape.carbon.core.util.enum.BaseEnum;
027:import org.sape.carbon.core.util.enum.EnumNotFoundException;
028:
029:
030:/**
031: * <P>This enumeration represents the types of concurrency supported in
032: * JDBC connections.</P>
033: *
034: * Copyright 2002 Sapient
035: * @see java.sql.ResultSet
036: * @since carbon 1.0
037: * @author Greg Hinkle, July 2002
038: * @version $Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:36 $)
039: */
040:public class ResultSetConcurrencyEnum extends BaseEnum implements  Serializable {
041:
042:
043:    /**
044:     * Represents the read-only type of concurrency
045:     * @see java.sql.ResultSet#CONCUR_READ_ONLY
046:     */
047:    public static final ResultSetConcurrencyEnum CONCUR_READ_ONLY =
048:        new ResultSetConcurrencyEnum("CONCUR_READ_ONLY",
049:                ResultSet.CONCUR_READ_ONLY);
050:
051:    /**
052:     * Represents the updatable type of concurrency
053:     * @see java.sql.ResultSet#CONCUR_UPDATABLE
054:     */
055:    public static final ResultSetConcurrencyEnum CONCUR_UPDATABLE =
056:        new ResultSetConcurrencyEnum("CONCUR_UPDATABLE",
057:                ResultSet.CONCUR_UPDATABLE);
058:
059:    /**
060:     * Constructs a enumeration of type <code>ResultSetConcurrencyEnum</code>
061:     *
062:     * @param name the String representation of this enumeration
063:     * @param ordinal the integer ordinal value of a specific
064:     */
065:    private ResultSetConcurrencyEnum(String name, int ordinal) {
066:        super (ResultSetConcurrencyEnum.class, name, ordinal);
067:    }
068:
069:
070:    /**
071:     * Looks up a <code>ResultSetConcurrencyEnum</code> by its
072:     * string representation
073:     *
074:     * @param name the String name of a enumeration instance
075:     * @return an specific <code>ResultSetConcurrencyEnum</code>
076:     * @throws ResultSetConcurrencyEnumNotFoundException when there is no
077:     *         enumeration instance for the given name
078:     */
079:    public static final ResultSetConcurrencyEnum getByName(String name)
080:            throws ResultSetConcurrencyEnumNotFoundException {
081:
082:        ResultSetConcurrencyEnum enum =  (ResultSetConcurrencyEnum)
083:        BaseEnum.getByName(name, ResultSetConcurrencyEnum.class);
084:        if (enum != null) {
085:            return enum;
086:        } else {
087:            throw new ResultSetConcurrencyEnumNotFoundException(name);
088:        }
089:    }
090:
091:    /**
092:     * Looks up a <code>ResultSetConcurrencyEnum</code> by its
093:     * ordinal representation
094:     *
095:     * @param ordinal the integer ordinal value of a specific
096:     *        enumeration instance
097:     * @return an specific <code>ResultSetConcurrencyEnum</code>
098:     * @throws ResultSetConcurrencyEnumNotFoundException when there is no
099:     *         enumeration instance for the given ordinal
100:     */
101:    public static ResultSetConcurrencyEnum getByOrdinal(int ordinal)
102:            throws ResultSetConcurrencyEnumNotFoundException {
103:
104:        ResultSetConcurrencyEnum enum =  (ResultSetConcurrencyEnum)
105:        BaseEnum.getByOrdinal(ordinal, ResultSetConcurrencyEnum.class);
106:        if (enum != null) {
107:            return enum;
108:        } else {
109:            throw new ResultSetConcurrencyEnum.
110:                ResultSetConcurrencyEnumNotFoundException(
111:                    (new Long(ordinal)).toString());
112:        }
113:    }
114:
115:    /**
116:     * Retrieves and iterator by ascending ordinal order for all enumerations
117:     * of this type.
118:     *
119:     * @return an iterator over all <code>ResultSetConcurrencyEnum</code>
120:     */
121:    public static Iterator iterator() {
122:        return BaseEnum.iterator(ResultSetConcurrencyEnum.class);
123:    }
124:
125:    /**
126:     * Overrides part of serialization to return a reference to an
127:     * enumeration instance that is managed by the Enumeration Subsystem.
128:     * This will always return the SAME object instance for any single
129:     * enum instance and is what allows the "==" operator to be used for
130:     * comparisons.
131:     *
132:     * @throws ObjectStreamException indicates there is a failure to
133:     *         resolve the streamed object due to a format or read io
134:     *         exception
135:     * @return the object instance that should be resolved by this class
136:     */
137:    final Object readResolve() throws ObjectStreamException {
138:        return super .getByOrdinal(this .ordinal, ResultSetConcurrencyEnum.class);
139:    }
140:
141:    /**
142:     * This class is a typesafe retriever excepection for an enumeration
143:     */
144:    public static class ResultSetConcurrencyEnumNotFoundException
145:            extends EnumNotFoundException {
146:
147:        /**
148:         * @see EnumNotFoundException#EnumNotFoundException
149:         */
150:        public ResultSetConcurrencyEnumNotFoundException(String name) {
151:            super (ResultSetConcurrencyEnum.class, name);
152:        }
153:    }
154:
155:
156:}
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.