Java Doc for Torque.java in  » Database-ORM » Torque » org » apache » torque » avalon » 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 » Torque » org.apache.torque.avalon 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.torque.avalon.Torque

All known Subclasses:   org.apache.torque.avalon.TorqueComponent,
Torque
public interface Torque extends Component(Code)
Avalon role interface for Torque.
author:
   Henning P. Schmiedehausen
author:
   Thomas Vandahl
version:
   $Id: Torque.java 493449 2007-01-06 11:46:50Z tv $


Field Summary
 StringROLE
     The avalon role.


Method Summary
 voidcloseConnection(Connection con)
     Closes a connection.
 org.apache.commons.configuration.ConfigurationgetConfiguration()
     Get the configuration for this component.
 ConnectiongetConnection()
     This method returns a Connection from the default pool.
 ConnectiongetConnection(String name)
    
Parameters:
  name - The database name.
 ConnectiongetConnection(String name, String username, String password)
     This method returns a Connecton using the given parameters. You should only use this method if you need user based access to the database!
Parameters:
  name - The database name.
Parameters:
  username - The name of the database user.
Parameters:
  password - The password of the database user.
 DBgetDB(String name)
     Returns database adapter for a specific connection pool.
Parameters:
  name - A pool name.
 DatabasegetDatabase(String databaseName)
     Returns the database for the key databaseName.
Parameters:
  databaseName - the key to get the database for.
 DatabaseMapgetDatabaseMap()
     Returns the default database map information.
 DatabaseMapgetDatabaseMap(String name)
     Returns the database map information.
 MapgetDatabases()
     Returns a Map containing all Databases registered to Torque. The key of the Map is the name of the database, and the value is the database instance.
 StringgetDefaultDB()
     Returns the name of the default database.
 AbstractBaseManagergetManager(String name)
     This method returns a Manager for the given name.
 AbstractBaseManagergetManager(String name, String defaultClassName)
     This methods returns either the Manager from the configuration file, or the default one provided by the generated code.
 MapBuildergetMapBuilder(String className)
    
 DatabasegetOrCreateDatabase(String databaseName)
     Returns the database for the key databaseName. If no database is associated to the specified key, a new database is created, mapped to the specified key, and returned.
Parameters:
  databaseName - the key to get the database for.
 StringgetSchema(String name)
     This method returns the current schema for a database connection
Parameters:
  name - The database name.
 booleanisInit()
     Determine whether Torque has already been initialized.
 voidregisterMapBuilder(String className)
    
 voidregisterMapBuilder(MapBuilder builder)
    
 voidsetSchema(String name, String schema)
    

Field Detail
ROLE
String ROLE(Code)
The avalon role.





Method Detail
closeConnection
void closeConnection(Connection con)(Code)
Closes a connection.
Parameters:
  con - A Connection to close.



getConfiguration
org.apache.commons.configuration.Configuration getConfiguration()(Code)
Get the configuration for this component. the Configuration



getConnection
Connection getConnection() throws TorqueException(Code)
This method returns a Connection from the default pool. The requested connection.
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



getConnection
Connection getConnection(String name) throws TorqueException(Code)

Parameters:
  name - The database name. a database connection
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



getConnection
Connection getConnection(String name, String username, String password) throws TorqueException(Code)
This method returns a Connecton using the given parameters. You should only use this method if you need user based access to the database!
Parameters:
  name - The database name.
Parameters:
  username - The name of the database user.
Parameters:
  password - The password of the database user. A Connection.
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



getDB
DB getDB(String name) throws TorqueException(Code)
Returns database adapter for a specific connection pool.
Parameters:
  name - A pool name. The corresponding database adapter.
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



getDatabase
Database getDatabase(String databaseName) throws TorqueException(Code)
Returns the database for the key databaseName.
Parameters:
  databaseName - the key to get the database for. the database for the specified key, or null if the databasedoes not exist.
throws:
  TorqueException - if Torque is not yet initialized.



getDatabaseMap
DatabaseMap getDatabaseMap() throws TorqueException(Code)
Returns the default database map information. A DatabaseMap.
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



getDatabaseMap
DatabaseMap getDatabaseMap(String name) throws TorqueException(Code)
Returns the database map information. Name relates to the name of the connection pool to associate with the map.
Parameters:
  name - The name of the database corresponding to theDatabaseMap to retrieve. The named DatabaseMap.
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



getDatabases
Map getDatabases() throws TorqueException(Code)
Returns a Map containing all Databases registered to Torque. The key of the Map is the name of the database, and the value is the database instance.
Note that in the very special case where a new database which is not configured in Torque's configuration gets known to Torque at a later time, the returned map may change, and there is no way to protect you against this. a Map containing all Databases known to Torque, never null.
throws:
  TorqueException - if Torque is not yet initialized.



getDefaultDB
String getDefaultDB()(Code)
Returns the name of the default database. name of the default DB



getManager
AbstractBaseManager getManager(String name)(Code)
This method returns a Manager for the given name.
Parameters:
  name - name of the manager a Manager



getManager
AbstractBaseManager getManager(String name, String defaultClassName)(Code)
This methods returns either the Manager from the configuration file, or the default one provided by the generated code.
Parameters:
  name - name of the manager
Parameters:
  defaultClassName - the class to use if name has not been configured a Manager



getMapBuilder
MapBuilder getMapBuilder(String className) throws TorqueException(Code)
Get a MapBuilder
Parameters:
  className - of the MapBuilder A MapBuilder, not null
throws:
  TorqueException - if the Map Builder cannot be instantiated



getOrCreateDatabase
Database getOrCreateDatabase(String databaseName)(Code)
Returns the database for the key databaseName. If no database is associated to the specified key, a new database is created, mapped to the specified key, and returned.
Parameters:
  databaseName - the key to get the database for. the database associated with specified key, or the newly createddatabase, never null.



getSchema
String getSchema(String name) throws TorqueException(Code)
This method returns the current schema for a database connection
Parameters:
  name - The database name. The current schema name. Null means, no schema has been set.
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



isInit
boolean isInit()(Code)
Determine whether Torque has already been initialized. true if Torque is already initialized



registerMapBuilder
void registerMapBuilder(String className)(Code)
Register a MapBuilder
Parameters:
  className - the MapBuilder



registerMapBuilder
void registerMapBuilder(MapBuilder builder)(Code)
Register a MapBuilder
Parameters:
  builder - the instance of the MapBuilder



setSchema
void setSchema(String name, String schema) throws TorqueException(Code)
Sets the current schema for a database connection
Parameters:
  name - The database name.
Parameters:
  schema - The current schema name
throws:
  TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.



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