Source Code Cross Referenced for EntityManager.java in  » Testing » PolePosition-0.20 » javax » persistence » 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 » Testing » PolePosition 0.20 » javax.persistence 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package javax.persistence;
002:
003:        /**
004:         * Interface used to interact with the persistence context.
005:         */
006:        public interface EntityManager {
007:
008:            /**
009:             * Make an instance managed, using the unqualified class name as the entity name.
010:             *
011:             * @param entity
012:             */
013:            public void persist(Object entity);
014:
015:            /**
016:             * Merge the state of the given entity into the current persistence context,
017:             * using the unqualified class name as the entity name.
018:             *
019:             * @param entity
020:             * @return the instance that the state was merged to
021:             *
022:             * @throws IllegalArgumentException if not an entity
023:             * or entity is in the removed state
024:             * @throws TransactionRequiredException if there is
025:             * no transaction
026:             */
027:            public <T> T merge(T entity);
028:
029:            /**
030:             * Remove the instance.
031:             *
032:             * @param entity
033:             * @throws IllegalArgumentException     if not an entity
034:             *                                      or entity is in the removed or in * the detached state
035:             * @throws TransactionRequiredException if there is
036:             *                                      no transaction
037:             */
038:            public void remove(Object entity);
039:
040:            /**
041:             * Refresh the state of the instance from the
042:             * database.
043:             *
044:             * @param entity
045:             * @throws IllegalArgumentException     if not an entity
046:             *                                      or entity is not in managed state
047:             * @throws TransactionRequiredException if there is
048:             *                                      no transaction
049:             */
050:            public void refresh(Object entity);
051:
052:            /**
053:             * Find by primary key.
054:             *
055:             * @param entityName
056:             * @param primaryKey
057:             * @return the found entity instance
058:             * @throws EntityNotFoundException  if the entity does not exist
059:             * @throws IllegalArgumentException if the first argument does
060:             *                                  not denote an entity type or the second
061:             *                                  argument is not a valid type for that
062:             *                                  entity s primary key
063:             */
064:            public Object find(String entityName, Object primaryKey);
065:
066:            /**
067:             * Find by primary key.
068:             *
069:             * @param entityClass
070:             * @param primaryKey
071:             * @return the found entity instance
072:             * @throws EntityNotFoundException  if the entity does not exist
073:             * @throws IllegalArgumentException if the first argument does
074:             *                                  not denote an entity type or the second
075:             *                                  argument is not a valid type for that
076:             *                                  entity s primary key
077:             */
078:            public <T> T find(Class<T> entityClass, Object primaryKey);
079:
080:            /**
081:             * Synchronize the persistence context with the underlying database.
082:             */
083:            public void flush();
084:
085:            /**
086:             * Create an instance of Query for executing an EJBQL query.
087:             *
088:             * @param ejbqlString an EJBQL query string
089:             * @return the new query instance
090:             */
091:            public Query createQuery(String ejbqlString);
092:
093:            /**
094:             * Create an instance of Query for executing a named query (in EJBQL or native SQL).
095:             *
096:             * @param name the name of a query defined in metadata
097:             * @return the new query instance
098:             */
099:            public Query createNamedQuery(String name);
100:
101:            /**
102:             * Create an instance of Query for executing a native SQL query.
103:             *
104:             * @param sqlString a native SQL query string
105:             * @return the new query instance
106:             */
107:            public Query createNativeQuery(String sqlString);
108:
109:            /**
110:             * Create an instance of Query for executing
111:             * a native SQL query.
112:             *
113:             * @param sqlString   a native SQL query string
114:             * @param resultClass the class of the resulting instances
115:             * @return the new query instance
116:             * @throws IllegalArgumentException if query string is not valid
117:             */
118:            public Query createNativeQuery(String sqlString, Class resultClass);
119:
120:            /**
121:             * Create an instance of Query for executing
122:             * a native SQL query.
123:             *
124:             * @param sqlString        a native SQL query string
125:             * @param resultSetMapping the name of the result set mapping
126:             * @return the new query instance
127:             * @throws IllegalArgumentException if query string is not valid
128:             */
129:            public Query createNativeQuery(String sqlString,
130:                    String resultSetMapping);
131:
132:            /**
133:             * Check if the instance belongs to the current persistence context.
134:             *
135:             * @param entity
136:             * @return
137:             */
138:            public boolean contains(Object entity);
139:
140:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.