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


java.lang.Object
   org.apache.torque.engine.database.model.Database

Database
public class Database (Code)
A class for holding application data structures.
author:
   John McNally
author:
   Daniel Rall
author:
   Greg Monroe
version:
   $Id: Database.java 473814 2006-11-11 22:30:30Z tv $



Constructor Summary
public  Database(String databaseType)
     Creates a new instance for the specified database type.

Method Summary
public  voidaddDomain(Domain domain)
    
public  voidaddOption(String key, String value)
     Add an XML Specified option key/value pair to this element's option set.
public  TableaddTable(Attributes attrib)
     An utility method to add a new table from an xml attribute.
public  voidaddTable(Table tbl)
    
public  voiddoFinalInitialization()
     Initializes the model.
public  StringgetBaseClass()
     Get the value of baseClass.
public  StringgetBasePeer()
     Get the value of basePeer.
protected  StringgetDatabaseType()
    
public  StringgetDefaultIdMethod()
     Get the value of defaultIdMethod.
public  StringgetDefaultJavaNamingMethod()
     Get the value of defaultJavaNamingMethod which specifies the method for converting schema names for table and column to Java names.
public  StringgetDefaultJavaType()
    
public  DomaingetDomain(String domainName)
    
public  StringgetFileName()
    
public  StringgetJavaName()
     Get the base name to use when creating related Java Classes.
public  StringgetName()
    
public  StringgetOption(String key)
     Get the value that was associated with this key in an XML option element.
Parameters:
  key - the key of the option.
public  MapgetOptions()
     Gets the full ordered hashtable array of items specified by XML option statements under this element.

Note, this is not thread save but since it's only used for generation which is single threaded, there should be minimum danger using this in Velocity. An Map of all options.

public  StringgetPackage()
     Get the value of package.
public  PlatformgetPlatform()
     Returns the Platform implementation for this database.
public  StringgetStandardJavaName()
     Convert dbName to a Java compatible name by the JavaName method only (ignores the defaultJavaNamingMethod).
public  TablegetTable(String name)
     Return the table with the specified name.
Parameters:
  name - table name A Table object.
public  TablegetTableByJavaName(String javaName)
     Return the table with the specified javaName.
Parameters:
  javaName - name of the java object representing the table A Table object.
public  ListgetTables()
    
public  booleanisHeavyIndexing()
     Get the value of heavyIndexing.
public  voidloadFromXML(Attributes attrib)
     Load the database object from an xml tag.
public  booleanrequiresIdTable()
     Determines if this database will be using the IDMethod.ID_BROKER to create ids for torque OM objects. true if there is at least one table in this database thatuses the IDMethod.ID_BROKER method of generatingids.
public  voidsetBaseClass(String v)
     Set the value of baseClass.
public  voidsetBasePeer(String v)
     Set the value of basePeer.
public  voidsetDatabaseType(String databaseType)
    
public  voidsetDefaultIdMethod(String v)
     Set the value of defaultIdMethod.
public  voidsetDefaultJavaNamingMethod(String v)
     Set the value of defaultJavaNamingMethod.
public  voidsetFileName(String name)
    
public  voidsetHeavyIndexing(boolean v)
     Set the value of heavyIndexing.
public  voidsetName(String name)
    
public  voidsetPackage(String v)
     Set the value of package.
public  StringtoString()
     Creats a string representation of this Database.


Constructor Detail
Database
public Database(String databaseType)(Code)
Creates a new instance for the specified database type.
Parameters:
  databaseType - The default type for this database.




Method Detail
addDomain
public void addDomain(Domain domain)(Code)



addOption
public void addOption(String key, String value)(Code)
Add an XML Specified option key/value pair to this element's option set.
Parameters:
  key - the key of the option.
Parameters:
  value - the value of the option.



addTable
public Table addTable(Attributes attrib)(Code)
An utility method to add a new table from an xml attribute.
Parameters:
  attrib - the xml attributes the created Table



addTable
public void addTable(Table tbl)(Code)
Add a table to the list and sets the Database property to this Database
Parameters:
  tbl - the table to add



doFinalInitialization
public void doFinalInitialization() throws EngineException(Code)
Initializes the model.
throws:
  EngineException -



getBaseClass
public String getBaseClass()(Code)
Get the value of baseClass. value of baseClass.



getBasePeer
public String getBasePeer()(Code)
Get the value of basePeer. value of basePeer.



getDatabaseType
protected String getDatabaseType()(Code)



getDefaultIdMethod
public String getDefaultIdMethod()(Code)
Get the value of defaultIdMethod. value of defaultIdMethod.



getDefaultJavaNamingMethod
public String getDefaultJavaNamingMethod()(Code)
Get the value of defaultJavaNamingMethod which specifies the method for converting schema names for table and column to Java names. The default naming conversion used by this database.



getDefaultJavaType
public String getDefaultJavaType()(Code)
Get type to use in Java sources (primitive || object) the type to use



getDomain
public Domain getDomain(String domainName)(Code)



getFileName
public String getFileName()(Code)



getJavaName
public String getJavaName()(Code)
Get the base name to use when creating related Java Classes. A Java syntax capatible version of the dbName using the methoddefined by the defaultJavaNamingMethod XML value.



getName
public String getName()(Code)
Get the name of the Database name of the Database



getOption
public String getOption(String key)(Code)
Get the value that was associated with this key in an XML option element.
Parameters:
  key - the key of the option. The value for the key or a null.



getOptions
public Map getOptions()(Code)
Gets the full ordered hashtable array of items specified by XML option statements under this element.

Note, this is not thread save but since it's only used for generation which is single threaded, there should be minimum danger using this in Velocity. An Map of all options. Will not be null but may be empty.




getPackage
public String getPackage()(Code)
Get the value of package. value of package.



getPlatform
public Platform getPlatform()(Code)
Returns the Platform implementation for this database. a Platform implementation



getStandardJavaName
public String getStandardJavaName()(Code)
Convert dbName to a Java compatible name by the JavaName method only (ignores the defaultJavaNamingMethod). The current dbName converted to a standard format that canbe used as part of a Java Object name.



getTable
public Table getTable(String name)(Code)
Return the table with the specified name.
Parameters:
  name - table name A Table object. If it does not exist it returns null



getTableByJavaName
public Table getTableByJavaName(String javaName)(Code)
Return the table with the specified javaName.
Parameters:
  javaName - name of the java object representing the table A Table object. If it does not exist it returns null



getTables
public List getTables()(Code)
Return an List of all tables List of all tables



isHeavyIndexing
public boolean isHeavyIndexing()(Code)
Get the value of heavyIndexing. value of heavyIndexing.



loadFromXML
public void loadFromXML(Attributes attrib)(Code)
Load the database object from an xml tag.
Parameters:
  attrib - the xml attributes



requiresIdTable
public boolean requiresIdTable()(Code)
Determines if this database will be using the IDMethod.ID_BROKER to create ids for torque OM objects. true if there is at least one table in this database thatuses the IDMethod.ID_BROKER method of generatingids. returns false otherwise.



setBaseClass
public void setBaseClass(String v)(Code)
Set the value of baseClass.
Parameters:
  v - Value to assign to baseClass.



setBasePeer
public void setBasePeer(String v)(Code)
Set the value of basePeer.
Parameters:
  v - Value to assign to basePeer.



setDatabaseType
public void setDatabaseType(String databaseType)(Code)



setDefaultIdMethod
public void setDefaultIdMethod(String v)(Code)
Set the value of defaultIdMethod.
Parameters:
  v - Value to assign to defaultIdMethod.



setDefaultJavaNamingMethod
public void setDefaultJavaNamingMethod(String v)(Code)
Set the value of defaultJavaNamingMethod.
Parameters:
  v - The default naming conversion for this database to use.



setFileName
public void setFileName(String name)(Code)



setHeavyIndexing
public void setHeavyIndexing(boolean v)(Code)
Set the value of heavyIndexing.
Parameters:
  v - Value to assign to heavyIndexing.



setName
public void setName(String name)(Code)
Set the name of the Database
Parameters:
  name - name of the Database



setPackage
public void setPackage(String v)(Code)
Set the value of package.
Parameters:
  v - Value to assign to package.



toString
public String toString()(Code)
Creats a string representation of this Database. The representation is given in xml format. string representation in xml



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.