Source Code Cross Referenced for LOBBean.java in  » EJB-Server-JBoss-4.2.1 » testsuite » org » jboss » test » cmp2 » lob » 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 » EJB Server JBoss 4.2.1 » testsuite » org.jboss.test.cmp2.lob 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JBoss, Home of Professional Open Source.
003:         * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004:         * as indicated by the @author tags. See the copyright.txt file in the
005:         * distribution for a full listing of individual contributors.
006:         *
007:         * This is free software; you can redistribute it and/or modify it
008:         * under the terms of the GNU Lesser General Public License as
009:         * published by the Free Software Foundation; either version 2.1 of
010:         * the License, or (at your option) any later version.
011:         *
012:         * This software is distributed in the hope that it will be useful,
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015:         * Lesser General Public License for more details.
016:         *
017:         * You should have received a copy of the GNU Lesser General Public
018:         * License along with this software; if not, write to the Free
019:         * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020:         * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021:         */
022:        package org.jboss.test.cmp2.lob;
023:
024:        import javax.ejb.EntityBean;
025:        import javax.ejb.EntityContext;
026:        import javax.ejb.CreateException;
027:        import javax.ejb.RemoveException;
028:        import java.util.Map;
029:        import java.util.List;
030:        import java.util.Set;
031:        import java.util.HashMap;
032:        import java.util.ArrayList;
033:        import java.util.HashSet;
034:
035:        /**
036:         * Implementaton of a CMP2 entity bean that is intended to demonstrate the
037:         * storage of large text and binary objects.
038:         *
039:         * @see javax.ejb.EntityBean
040:         *
041:         * @version <tt>$Revision: 57211 $</tt>
042:         * @author  <a href="mailto:steve@resolvesw.com">Steve Coy</a>
043:         * @author  <a href="mailto:alex@jboss.org">Alexey Loubyansky</a>
044:         */
045:        public abstract class LOBBean implements  EntityBean {
046:            private EntityContext mEntityContext;
047:
048:            /**
049:             * Returns the primary key
050:             * @return Integer
051:             */
052:            public abstract Integer getId();
053:
054:            /**
055:             * Sets the primary key.
056:             * @param id
057:             */
058:            public abstract void setId(Integer id);
059:
060:            /**
061:             * Returns the large string attribute.
062:             * @return String
063:             */
064:            public abstract String getBigString();
065:
066:            /**
067:             * Sets the value of the large string attribute.
068:             * The idea here is to store it in a CLOB object in associated database table
069:             * so that we can check the container's LOB functionality properly.
070:             * @param s
071:             */
072:            public abstract void setBigString(String s);
073:
074:            /**
075:             * Returns the content of the large binary object.
076:             * @return byte[]
077:             */
078:            public abstract byte[] getBinaryData();
079:
080:            /**
081:             * Sets the content of the large binary object.
082:             * The idea here is to store it in a BLOB object in the associated database
083:             * table so that we check the container's LOB functionality properly.
084:             * @param data
085:             */
086:            public abstract void setBinaryData(byte[] data);
087:
088:            public abstract Object getObjectField();
089:
090:            public abstract void setObjectField(Object obj);
091:
092:            public abstract Map getMapField();
093:
094:            public abstract void setMapField(Map map);
095:
096:            public abstract List getListField();
097:
098:            public abstract void setListField(List list);
099:
100:            public abstract Set getSetField();
101:
102:            public abstract void setSetField(Set set);
103:
104:            public abstract ValueHolder getValueHolder();
105:
106:            public abstract void setValueHolder(ValueHolder valueHolder);
107:
108:            public abstract ValueHolder getCleanGetValueHolder();
109:
110:            public abstract void setCleanGetValueHolder(ValueHolder valueHolder);
111:
112:            public abstract ValueHolder getStateFactoryValueHolder();
113:
114:            public abstract void setStateFactoryValueHolder(
115:                    ValueHolder valueHolder);
116:
117:            // EntityBean implementation
118:
119:            public Integer ejbCreate(Integer id) throws CreateException {
120:                setId(id);
121:                setMapField(new HashMap());
122:                setListField(new ArrayList());
123:                setSetField(new HashSet());
124:                setValueHolder(new ValueHolder(null));
125:                setCleanGetValueHolder(new ValueHolder(null));
126:                setStateFactoryValueHolder(new ValueHolder(null));
127:                return null;
128:            }
129:
130:            public void ejbPostCreate(Integer id) {
131:            }
132:
133:            public void ejbActivate() {
134:            }
135:
136:            public void ejbLoad() {
137:            }
138:
139:            public void ejbPassivate() {
140:            }
141:
142:            public void ejbRemove() throws RemoveException {
143:            }
144:
145:            public void ejbStore() {
146:            }
147:
148:            public void setEntityContext(EntityContext ctx) {
149:                mEntityContext = ctx;
150:            }
151:
152:            public void unsetEntityContext() {
153:                mEntityContext = null;
154:            }
155:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.