Java Doc for PersistenceContext.java in  » Database-ORM » Ammentos » it » biobytes » ammentos » 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 » Ammentos » it.biobytes.ammentos 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   it.biobytes.ammentos.PersistenceContext

PersistenceContext
public class PersistenceContext (Code)

author:
   davide



Constructor Summary
protected  PersistenceContext(DataSource dataSource)
    

Method Summary
public  voidcloseIteration()
    
public  voidcommitTransaction()
    
public  intcount(Class<T> c, Query qry)
    
public  intcount(Class<T> c, QueryFilter filter)
    
public  voiddelete(T obj)
     Deletes the object.
public  voiddelete(Class<T> c, QueryFilter filter)
     Deletes all the objects of class c matching the provided QueryFilter.
public  FrameworkCachegetCache()
    
public  DataSourcegetDataSource()
    
public  EntityIterablegetIterable()
    
protected  FrameworkStategetState()
    
protected  TransactiongetTransaction()
    
protected  booleanisLoaded(Class<T> c, T obj)
    
public  Iterable<T>iterate(Class<T> c, Query qry)
    
public  Tload(Class<T> c, Object primaryKey)
    
public  List<T>load(Class<T> c, Query qry)
     Loads the objects which match the provided query.
public  List<T>load(Class<T> c, QueryFilter filter)
     Loads the objects which match the provided query.
public  TloadUnique(Class<T> c, Query qry)
     This method represents a shortcut for loading objects with queries when the expected return value is only one object.
public  TloadUnique(Class<T> c, QueryFilter filter)
     This method represents a shortcut for loading objects with queries when the expected return value is only one object.
public  List<T>loadUpdatable(Class<T> c, Query qry)
     Returns an updatable list of objects which match the provided query.
public  Tlookup(Class<T> c, Object primaryKey)
     Lookup the object of the provided class whith the specified primary key.
protected  voidmarkAsLoaded(Class<T> c, T obj)
    
public  voidopenTransaction()
    
public  voidopenTransaction(int isolationLevel)
    
public  voidoverride(T obj)
     Saves the provided object instance, regardless the object is already present into the target domain.
public  voidrollbackTransaction()
    
public  voidsave(T obj)
     Saves the provided object instance.
protected  voidsetDataSource(DataSource dataSource)
    
protected  voidsetIterable(EntityIterable iterable)
    
protected  voidsetState(FrameworkState state)
    
protected  voidsetTransaction(Transaction transaction)
    
protected  voidunmarkAsLoaded(Class<T> c, T obj)
    


Constructor Detail
PersistenceContext
protected PersistenceContext(DataSource dataSource)(Code)




Method Detail
closeIteration
public void closeIteration() throws PersistenceException(Code)



commitTransaction
public void commitTransaction() throws PersistenceException(Code)



count
public int count(Class<T> c, Query qry) throws PersistenceException(Code)
Counts the objects matching the provided query
Parameters:
  c -
Parameters:
  qry -
throws:
  it.biobytes.ammentos.PersistenceException -



count
public int count(Class<T> c, QueryFilter filter) throws PersistenceException(Code)
Counts the objects matching the provided query filter
Parameters:
  c -
Parameters:
  qry -
throws:
  it.biobytes.ammentos.PersistenceException -



delete
public void delete(T obj) throws PersistenceException(Code)
Deletes the object. If a transaction is opened this operation will be actually performed when the commitTransaction() method will be called
Parameters:
  obj - The object to delete
throws:
  it.biobytes.ammentos.PersistenceException -



delete
public void delete(Class<T> c, QueryFilter filter) throws PersistenceException(Code)
Deletes all the objects of class c matching the provided QueryFilter. If a transaction is opened this operation will be actually performed when the commitTransaction() method will be called



getCache
public FrameworkCache getCache()(Code)



getDataSource
public DataSource getDataSource()(Code)



getIterable
public EntityIterable getIterable()(Code)



getState
protected FrameworkState getState()(Code)



getTransaction
protected Transaction getTransaction()(Code)



isLoaded
protected boolean isLoaded(Class<T> c, T obj)(Code)



iterate
public Iterable<T> iterate(Class<T> c, Query qry) throws PersistenceException(Code)



load
public T load(Class<T> c, Object primaryKey) throws PersistenceException(Code)
Loads the object whith the provided primary key
Parameters:
  c -
Parameters:
  primaryKey -
throws:
  it.biobytes.ammentos.PersistenceException -



load
public List<T> load(Class<T> c, Query qry) throws PersistenceException(Code)
Loads the objects which match the provided query. The returned list is unmodifiabale.
Parameters:
  c -
Parameters:
  qry -
throws:
  it.biobytes.ammentos.PersistenceException -



load
public List<T> load(Class<T> c, QueryFilter filter) throws PersistenceException(Code)
Loads the objects which match the provided query.
Parameters:
  c -
Parameters:
  filter -
throws:
  it.biobytes.ammentos.PersistenceException -



loadUnique
public T loadUnique(Class<T> c, Query qry) throws PersistenceException(Code)
This method represents a shortcut for loading objects with queries when the expected return value is only one object. A persistenceException will be thrown if the query returns more than one value.
Parameters:
  c -
Parameters:
  query -
throws:
  it.biobytes.ammentos.PersistenceException -



loadUnique
public T loadUnique(Class<T> c, QueryFilter filter) throws PersistenceException(Code)
This method represents a shortcut for loading objects with queries when the expected return value is only one object. A persistenceException will be thrown if the query returns more than one value.
Parameters:
  c -
Parameters:
  filter -
throws:
  it.biobytes.ammentos.PersistenceException -



loadUpdatable
public List<T> loadUpdatable(Class<T> c, Query qry) throws PersistenceException(Code)
Returns an updatable list of objects which match the provided query. By calling add() and remove() method on this list the objects will be respectively saved or removed from their persistor.



lookup
public T lookup(Class<T> c, Object primaryKey) throws PersistenceException(Code)
Lookup the object of the provided class whith the specified primary key. This methods uses an internal caching mechanism which dramatically increases the performance, so use this method instead of load(Class,String) whenever is possible to obtain the best performance in retrieving objects.
Parameters:
  c -
Parameters:
  primaryKey -
throws:
  it.biobytes.ammentos.PersistenceException -



markAsLoaded
protected void markAsLoaded(Class<T> c, T obj)(Code)



openTransaction
public void openTransaction() throws PersistenceException(Code)



openTransaction
public void openTransaction(int isolationLevel) throws PersistenceException(Code)



override
public void override(T obj) throws PersistenceException(Code)
Saves the provided object instance, regardless the object is already present into the target domain. If the object is already present the call corresponds to a normale save() method, otherwise a delete() method followed by a new save() method is called.
Parameters:
  obj - The object to override
throws:
  it.biobytes.ammentos.PersistenceException - If any errors occurr while saving the object



rollbackTransaction
public void rollbackTransaction() throws PersistenceException(Code)



save
public void save(T obj) throws PersistenceException(Code)
Saves the provided object instance. If a transaction is opened this operation will be actually performed when the commitTransaction() method will be called
Parameters:
  obj - The object to save
throws:
  it.biobytes.ammentos.PersistenceException - If any errors occurr while saving the object



setDataSource
protected void setDataSource(DataSource dataSource)(Code)



setIterable
protected void setIterable(EntityIterable iterable)(Code)



setState
protected void setState(FrameworkState state)(Code)



setTransaction
protected void setTransaction(Transaction transaction)(Code)



unmarkAsLoaded
protected void unmarkAsLoaded(Class<T> c, T obj)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.