Java Doc for AmberPersistenceUnit.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » amber » manager » 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 resin 3.1.5 » resin » com.caucho.amber.manager 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.amber.manager.AmberPersistenceUnit

AmberPersistenceUnit
public class AmberPersistenceUnit (Code)
Main interface between Resin and the connector. It's the top-level SPI class for creating the SPI ManagedConnections. The resource configuration in Resin's web.xml will use bean-style configuration to configure the ManagecConnectionFactory.



Constructor Summary
public  AmberPersistenceUnit(AmberContainer container, String name)
    

Method Summary
public  ListenerTypeaddDefaultListener(JClass beanClass)
     Adds a default listener.
public  voidaddEntityClass(String className, JClass type)
     Add an entity.
public  ListenerTypeaddEntityListener(String entityName, JClass listenerClass)
     Adds an entity listener.
public  voidaddNamedNativeQuery(String name, NamedNativeQueryConfig queryConfig)
     Adds a named native query.
public  voidaddNamedQuery(String name, String query)
     Adds a named query.
public  voidaddSqlResultSetMapping(String resultSetName, SqlResultSetMappingConfig resultSet)
     Adds a sql result set mapping.
protected  voidcallListeners(int callbackIndex, Entity entity)
     Applies persistence unit default and entity listeners for @PreXxx, @PostXxx callbacks.
public  voidcomplete(ArrayList<AmberCompletion> completions)
     Completions affecting the cache.
public  voidconfigure()
     Configure lazy.
public  EntitycopyFromCacheItem(AmberConnection aConn, Entity contextEntity, EntityItem cacheItem)
     Safely copies a cache item to a context object.
public  AmberConnectioncreateAmberConnection(boolean isExtended)
     Returns the cache connection.
public  EmbeddableTypecreateEmbeddable(JClass beanClass)
     Adds an embeddable type.
public  EmbeddableTypecreateEmbeddable(String name, JClass beanClass)
     Adds an embeddable type.
public  EntityTypecreateEntity(JClass beanClass)
     Adds an entity.
public  EntityTypecreateEntity(String name, JClass beanClass)
     Adds an entity.
public  EnumTypecreateEnum(String name, JClass beanClass)
     Adds an enumerated type.
public  GeneratorTableTypecreateGeneratorTable(String name)
     Adds a generator table.
public  MappedSuperclassTypecreateMappedSuperclass(String name, JClass beanClass)
     Adds an entity.
public  SequenceIdGeneratorcreateSequenceGenerator(String name, int size)
     Returns a sequence generator.
public  TablecreateTable(String tableName)
     Creates a table.
public  TypecreateType(String typeName)
     Creates a type.
public  TypecreateType(JClass javaType)
     Creates a type.
public  voiddestroy()
     destroys the manager.
public  voidgenerate()
     Configure lazy.
public  voidgenerate(JavaClassGenerator javaGen)
     Configure lazy.
public  AmberContainergetAmberContainer()
    
public  CacheConnectiongetCacheConnection()
     Returns the cache connection.
public  ThrowablegetConfigException()
    
public  StringgetCreateColumnSQL(int sqlType, int length, int precision, int scale)
     New Version of getCreateTableSQL which returns the SQL for the table with the given SQL type but takes sqlType, length, precision, and scale.
public  booleangetCreateDatabaseTables()
     Set true if database tables should be created automatically.
public  DataSourcegetDataSource()
     Gets the data source.
public  ListenerTypegetDefaultListener(String className)
     Gets a default listener.
public  EmbeddableTypegetEmbeddable(String className)
     Returns a matching embeddable type.
public  EmbeddableIntrospectorgetEmbeddableIntrospector()
     Returns the @Embeddable introspector.
public  ClassLoadergetEnhancedLoader()
    
public  EntityItemgetEntity(EntityType rootType, Object key)
     Returns the entity with the given key.
public  EntityItemgetEntity(EntityKey entityKey)
     Returns the entity with the given key.
public  EntityTypegetEntityByInstanceClass(String className)
     Returns a matching entity.
public  AmberEntityHomegetEntityHome(String name)
     Returns the entity home.
public  EntityItemgetEntityItem(String homeName, Object key)
     Returns the entity item.
public  ListenerTypegetEntityListener(String className)
     Gets an entity listener.
public  EntityManagergetEntityManager()
    
public  EntityTypegetEntityType(String className)
     Returns a matching entity.
public  StringgetFalseLiteral()
     Returns the FALSE SQL literal, i.e., either "false" or "0".
public  AmberGeneratorgetGenerator()
     Sets the generator.
public  AmberEntityHomegetHome(Class cl)
     Returns an EntityHome.
public  AmberEntityHomegetHomeBySchema(String name)
     Returns the entity home by the schema name.
public  JClassLoadergetJClassLoader()
     Returns the enhanced loader.
public  MappedSuperclassTypegetMappedSuperclass(String className)
     Returns a matching mapped superclass.
public  JdbcMetaDatagetMetaData()
     Returns the jdbc meta data.
public  StringgetName()
    
public  NamedNativeQueryConfiggetNamedNativeQuery(String name)
     Returns the named native query.
public  StringgetNamedQuery(String name)
     Returns the named query statement.
public  ResultSetCacheChunkgetQueryChunk(QueryCacheKey key)
     Returns the query result.
public  ResultSetMetaDatagetQueryMetaData(QueryCacheKey key)
     Returns the query meta data.
public  AbstractQuerygetQueryParseCache(String sql)
     Returns the query cache.
public  DataSourcegetReadDataSource()
     Gets the read data source.
public  SqlResultSetMappingConfiggetSqlResultSetMapping(String resultSetName)
     Returns the sql result set mapping.
public  longgetTableCacheTimeout()
     Get the default table cache time.
public  IdGeneratorgetTableGenerator(String name)
     Returns a table generator.
public  AmberConnectiongetThreadConnection(boolean isExtended)
     Returns the thread's amber connection.
public  booleangetValidateDatabaseTables()
     Set true if database tables should be validated automatically.
public  DataSourcegetXADataSource()
     Gets the xa data source.
public  longgetXid()
     Returns a new xid.
public  booleanhasPositionFunction()
     Returns true if POSITION SQL function is allowed.
public  booleanhasReturnGeneratedKeys()
     Returns true if generated keys are allowed.
public  voidinit()
     Initialize the resource.
public  voidinitEntityHomes()
    
public  voidinitLoaders()
     Initialize the resource.
public  voidinitTables()
     Configure lazy.
public  voidinitType(AbstractEnhancedType type)
     Configures a type.
public  booleanisJPA()
     Gets the JPA flag.
public  booleanisJta()
    
public  EntityItemputEntity(EntityType rootType, Object key, EntityItem entity)
     Sets the entity result.
public  EntityItemputEntity(Class cl, Object key, EntityItem entity)
     Sets the entity result.
public  voidputQueryChunk(QueryCacheKey key, ResultSetCacheChunk chunk)
     Sets the query result.
public  voidputQueryMetaData(QueryCacheKey key, ResultSetMetaData metaData)
     Sets the query meta data.
public  voidputQueryParseCache(String sql, AbstractQuery query)
     Returns the query cache.
public  IdGeneratorputTableGenerator(String name, IdGenerator gen)
     Sets a table generator.
public  EntityItemremoveEntity(EntityType rootType, Object key)
     Remove the entity result.
public  voidremoveThreadConnection()
     Unset the thread's amber connection.
public  voidsetBytecodeGenerator(boolean isBytecodeGenerator)
     Set false for EJB-style generation.
public  voidsetCreateDatabaseTables(boolean create)
     Set true if database tables should be created automatically.
public  voidsetDataSource(DataSource dataSource)
     Sets the data source.
public  voidsetEnhancedLoader(ClassLoader loader)
     EJB/CMP needs to set a special enhanced loader.
public  voidsetEntityMappingsList(ArrayList<EntityMappingsConfig> entityMappingsList)
     Sets the entity mappings config.
public  voidsetJPA(boolean isJPA)
     Sets the JPA flag.
public  voidsetJtaDataSource(DataSource dataSource)
     Sets the persistence.xml jta data source.
public  voidsetName(String name)
    
public  voidsetNonJtaDataSource(DataSource dataSource)
     Sets the persistence.xml non-jta data source.
public  voidsetReadDataSource(DataSource dataSource)
     Sets the read data source.
public  voidsetTableCacheTimeout(long timeout)
     Set the default table cache time.
public  voidsetValidateDatabaseTables(boolean validate)
     Set true if database tables should be validated automatically.
public  voidsetXADataSource(DataSource dataSource)
     Sets the XA data source.
public  StringtoString()
    
public  EntityItemupdateCacheItem(EntityType rootType, Object key, Entity contextEntity, EntityItem cacheItem)
     Updates the cache item after commit.
public  voidupdateFlushPriority()
     Updates global entity priorities for flushing.


Constructor Detail
AmberPersistenceUnit
public AmberPersistenceUnit(AmberContainer container, String name)(Code)




Method Detail
addDefaultListener
public ListenerType addDefaultListener(JClass beanClass)(Code)
Adds a default listener.



addEntityClass
public void addEntityClass(String className, JClass type) throws ConfigException(Code)
Add an entity.
Parameters:
  className - the class name
Parameters:
  type - the JClass type if it is already verified as anEntity | Embeddable | MappedSuperclass



addEntityListener
public ListenerType addEntityListener(String entityName, JClass listenerClass)(Code)
Adds an entity listener.



addNamedNativeQuery
public void addNamedNativeQuery(String name, NamedNativeQueryConfig queryConfig) throws ConfigException(Code)
Adds a named native query.



addNamedQuery
public void addNamedQuery(String name, String query) throws ConfigException(Code)
Adds a named query.



addSqlResultSetMapping
public void addSqlResultSetMapping(String resultSetName, SqlResultSetMappingConfig resultSet) throws ConfigException(Code)
Adds a sql result set mapping.



callListeners
protected void callListeners(int callbackIndex, Entity entity)(Code)
Applies persistence unit default and entity listeners for @PreXxx, @PostXxx callbacks.



complete
public void complete(ArrayList<AmberCompletion> completions)(Code)
Completions affecting the cache.



configure
public void configure() throws Exception(Code)
Configure lazy.



copyFromCacheItem
public Entity copyFromCacheItem(AmberConnection aConn, Entity contextEntity, EntityItem cacheItem)(Code)
Safely copies a cache item to a context object.



createAmberConnection
public AmberConnection createAmberConnection(boolean isExtended)(Code)
Returns the cache connection.



createEmbeddable
public EmbeddableType createEmbeddable(JClass beanClass)(Code)
Adds an embeddable type.



createEmbeddable
public EmbeddableType createEmbeddable(String name, JClass beanClass)(Code)
Adds an embeddable type.



createEntity
public EntityType createEntity(JClass beanClass)(Code)
Adds an entity.



createEntity
public EntityType createEntity(String name, JClass beanClass)(Code)
Adds an entity.



createEnum
public EnumType createEnum(String name, JClass beanClass)(Code)
Adds an enumerated type.



createGeneratorTable
public GeneratorTableType createGeneratorTable(String name)(Code)
Adds a generator table.



createMappedSuperclass
public MappedSuperclassType createMappedSuperclass(String name, JClass beanClass)(Code)
Adds an entity.



createSequenceGenerator
public SequenceIdGenerator createSequenceGenerator(String name, int size) throws ConfigException(Code)
Returns a sequence generator.



createTable
public Table createTable(String tableName)(Code)
Creates a table.



createType
public Type createType(String typeName) throws ConfigException(Code)
Creates a type.



createType
public Type createType(JClass javaType) throws ConfigException(Code)
Creates a type.



destroy
public void destroy()(Code)
destroys the manager.



generate
public void generate() throws Exception(Code)
Configure lazy.



generate
public void generate(JavaClassGenerator javaGen) throws Exception(Code)
Configure lazy.



getAmberContainer
public AmberContainer getAmberContainer()(Code)



getCacheConnection
public CacheConnection getCacheConnection()(Code)
Returns the cache connection.



getConfigException
public Throwable getConfigException()(Code)



getCreateColumnSQL
public String getCreateColumnSQL(int sqlType, int length, int precision, int scale)(Code)
New Version of getCreateTableSQL which returns the SQL for the table with the given SQL type but takes sqlType, length, precision, and scale.



getCreateDatabaseTables
public boolean getCreateDatabaseTables()(Code)
Set true if database tables should be created automatically.



getDataSource
public DataSource getDataSource()(Code)
Gets the data source.



getDefaultListener
public ListenerType getDefaultListener(String className)(Code)
Gets a default listener.



getEmbeddable
public EmbeddableType getEmbeddable(String className)(Code)
Returns a matching embeddable type.



getEmbeddableIntrospector
public EmbeddableIntrospector getEmbeddableIntrospector()(Code)
Returns the @Embeddable introspector.



getEnhancedLoader
public ClassLoader getEnhancedLoader()(Code)



getEntity
public EntityItem getEntity(EntityType rootType, Object key)(Code)
Returns the entity with the given key.



getEntity
public EntityItem getEntity(EntityKey entityKey)(Code)
Returns the entity with the given key.



getEntityByInstanceClass
public EntityType getEntityByInstanceClass(String className)(Code)
Returns a matching entity.



getEntityHome
public AmberEntityHome getEntityHome(String name)(Code)
Returns the entity home.



getEntityItem
public EntityItem getEntityItem(String homeName, Object key) throws AmberException(Code)
Returns the entity item.



getEntityListener
public ListenerType getEntityListener(String className)(Code)
Gets an entity listener.



getEntityManager
public EntityManager getEntityManager()(Code)



getEntityType
public EntityType getEntityType(String className)(Code)
Returns a matching entity.



getFalseLiteral
public String getFalseLiteral()(Code)
Returns the FALSE SQL literal, i.e., either "false" or "0".



getGenerator
public AmberGenerator getGenerator()(Code)
Sets the generator.



getHome
public AmberEntityHome getHome(Class cl)(Code)
Returns an EntityHome.



getHomeBySchema
public AmberEntityHome getHomeBySchema(String name)(Code)
Returns the entity home by the schema name.



getJClassLoader
public JClassLoader getJClassLoader()(Code)
Returns the enhanced loader.



getMappedSuperclass
public MappedSuperclassType getMappedSuperclass(String className)(Code)
Returns a matching mapped superclass.



getMetaData
public JdbcMetaData getMetaData()(Code)
Returns the jdbc meta data.



getName
public String getName()(Code)



getNamedNativeQuery
public NamedNativeQueryConfig getNamedNativeQuery(String name)(Code)
Returns the named native query.



getNamedQuery
public String getNamedQuery(String name)(Code)
Returns the named query statement.



getQueryChunk
public ResultSetCacheChunk getQueryChunk(QueryCacheKey key)(Code)
Returns the query result.



getQueryMetaData
public ResultSetMetaData getQueryMetaData(QueryCacheKey key)(Code)
Returns the query meta data.



getQueryParseCache
public AbstractQuery getQueryParseCache(String sql)(Code)
Returns the query cache.



getReadDataSource
public DataSource getReadDataSource()(Code)
Gets the read data source.



getSqlResultSetMapping
public SqlResultSetMappingConfig getSqlResultSetMapping(String resultSetName)(Code)
Returns the sql result set mapping.



getTableCacheTimeout
public long getTableCacheTimeout()(Code)
Get the default table cache time.



getTableGenerator
public IdGenerator getTableGenerator(String name)(Code)
Returns a table generator.



getThreadConnection
public AmberConnection getThreadConnection(boolean isExtended)(Code)
Returns the thread's amber connection.



getValidateDatabaseTables
public boolean getValidateDatabaseTables()(Code)
Set true if database tables should be validated automatically.



getXADataSource
public DataSource getXADataSource()(Code)
Gets the xa data source.



getXid
public long getXid()(Code)
Returns a new xid.



hasPositionFunction
public boolean hasPositionFunction()(Code)
Returns true if POSITION SQL function is allowed.



hasReturnGeneratedKeys
public boolean hasReturnGeneratedKeys()(Code)
Returns true if generated keys are allowed.



init
public void init() throws ConfigException, IOException(Code)
Initialize the resource.



initEntityHomes
public void initEntityHomes() throws AmberRuntimeException, ConfigException(Code)



initLoaders
public void initLoaders() throws ConfigException, IOException(Code)
Initialize the resource.



initTables
public void initTables() throws ConfigException(Code)
Configure lazy.



initType
public void initType(AbstractEnhancedType type) throws Exception(Code)
Configures a type.



isJPA
public boolean isJPA()(Code)
Gets the JPA flag.



isJta
public boolean isJta()(Code)
Return true for a jta-managed persistence unit



putEntity
public EntityItem putEntity(EntityType rootType, Object key, EntityItem entity)(Code)
Sets the entity result.



putEntity
public EntityItem putEntity(Class cl, Object key, EntityItem entity)(Code)
Sets the entity result.



putQueryChunk
public void putQueryChunk(QueryCacheKey key, ResultSetCacheChunk chunk)(Code)
Sets the query result.



putQueryMetaData
public void putQueryMetaData(QueryCacheKey key, ResultSetMetaData metaData)(Code)
Sets the query meta data.



putQueryParseCache
public void putQueryParseCache(String sql, AbstractQuery query)(Code)
Returns the query cache.



putTableGenerator
public IdGenerator putTableGenerator(String name, IdGenerator gen)(Code)
Sets a table generator.



removeEntity
public EntityItem removeEntity(EntityType rootType, Object key)(Code)
Remove the entity result.



removeThreadConnection
public void removeThreadConnection()(Code)
Unset the thread's amber connection.



setBytecodeGenerator
public void setBytecodeGenerator(boolean isBytecodeGenerator)(Code)
Set false for EJB-style generation.



setCreateDatabaseTables
public void setCreateDatabaseTables(boolean create)(Code)
Set true if database tables should be created automatically.



setDataSource
public void setDataSource(DataSource dataSource)(Code)
Sets the data source.



setEnhancedLoader
public void setEnhancedLoader(ClassLoader loader)(Code)
EJB/CMP needs to set a special enhanced loader.



setEntityMappingsList
public void setEntityMappingsList(ArrayList<EntityMappingsConfig> entityMappingsList)(Code)
Sets the entity mappings config.



setJPA
public void setJPA(boolean isJPA)(Code)
Sets the JPA flag.



setJtaDataSource
public void setJtaDataSource(DataSource dataSource)(Code)
Sets the persistence.xml jta data source.



setName
public void setName(String name)(Code)



setNonJtaDataSource
public void setNonJtaDataSource(DataSource dataSource)(Code)
Sets the persistence.xml non-jta data source.



setReadDataSource
public void setReadDataSource(DataSource dataSource)(Code)
Sets the read data source.



setTableCacheTimeout
public void setTableCacheTimeout(long timeout)(Code)
Set the default table cache time.



setValidateDatabaseTables
public void setValidateDatabaseTables(boolean validate)(Code)
Set true if database tables should be validated automatically.



setXADataSource
public void setXADataSource(DataSource dataSource)(Code)
Sets the XA data source.



toString
public String toString()(Code)



updateCacheItem
public EntityItem updateCacheItem(EntityType rootType, Object key, Entity contextEntity, EntityItem cacheItem)(Code)
Updates the cache item after commit.



updateFlushPriority
public void updateFlushPriority()(Code)
Updates global entity priorities for flushing.



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.