Java Doc for DatabaseSchema.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » vdl » dbschema » 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 » Workflow Engines » pegasus 2.1.0 » org.griphyn.vdl.dbschema 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.vdl.dbschema.DatabaseSchema

All known Subclasses:   org.griphyn.vdl.dbschema.WorkflowSchema,  org.griphyn.vdl.dbschema.InvocationSchema,  org.griphyn.vdl.dbschema.NXDSchema,  org.griphyn.vdl.dbschema.ChunkSchema,  org.griphyn.vdl.dbschema.NXDInvSchema,  org.griphyn.common.catalog.transformation.Database,  org.griphyn.vdl.dbschema.InMemorySchema,  org.griphyn.vdl.dbschema.AnnotationSchema,
DatabaseSchema
abstract public class DatabaseSchema implements Catalog(Code)
This common schema interface defines the schemas in which the abstraction layers access any given database. It is independent of the implementing database, and does so by going via the database driver class API.

The separation of database driver and schema lowers the implementation cost, as only N driver and M schemas need to be implemented, instead of N x M schema-specific database-specific drivers.
author:
   Jens-S. Vöckler
author:
   Yong Zhao
version:
   $Revision: 365 $
See Also:   org.griphyn.vdl.dbdriver



Field Summary
protected  DatabaseDriverm_dbdriver
     This is the variable that connect to the lower level database driver.
protected  Propertiesm_dbschemaprops
     This stores properties specific to the schema.

Constructor Summary
protected  DatabaseSchema()
     Minimalistic default ctor.
public  DatabaseSchema(String dbDriverName, String url, Properties dbDriverProperties, Properties dbSchemaProperties)
     Connects to the database, this method does not rely on global property values, instead, each property has to be provided explicitly.
Parameters:
  dbDriverName - is the name of the class that conforms tothe DatabaseDriver API.
public  DatabaseSchema(String dbDriverName, String propertyPrefix)
     Connects to the database as specified by the properties, and checks the schema implementation.
public  DatabaseSchema(DatabaseDriver driver, String propertyPrefix)
     Associates a schema with a given database driver.

Method Summary
public  booleancachingMakesSense()
     pass-thru to driver. true, if it is feasible to cache results from the driverfalse, if requerying the driver is sufficiently fast (e.g.
public  voidclose()
     Disassociate from the database driver before finishing.
protected  voidfinalize()
     Disassociate the database driver cleanly.
public static  DatabaseSchemaloadSchema(String dbSchemaName, String propertyPrefix, Object[] arguments)
     Instantiates the appropriate leaf schema according to property values. This method is a factory.
Parameters:
  dbSchemaName - is the name of the class that conforms tothe DatabaseSchema API.
public static  DatabaseSchemaloadSchema(String propertyPrefix)
     Convenience method instantiates the appropriate child according to property values.
protected  voidlongOrNull(PreparedStatement ps, int pos, long l)
     Adds a BIGINT or a SQL-NULL at the current prepared statement position, depending if the value is -1 or not.
protected  StringmakeNotNull(String s)
     Converts any given string into a guaranteed non-null value. Especially the definition triples use empty strings instead of null values.
Parameters:
  s - is the string object to look at, which may be null.
protected  voidstringOrNull(PreparedStatement ps, int pos, String s)
     Adds a string or a SQL-NULL at the current prepared statement position, depending if the String value is null or not.

Field Detail
m_dbdriver
protected DatabaseDriver m_dbdriver(Code)
This is the variable that connect to the lower level database driver.



m_dbschemaprops
protected Properties m_dbschemaprops(Code)
This stores properties specific to the schema. Currently unused.




Constructor Detail
DatabaseSchema
protected DatabaseSchema()(Code)
Minimalistic default ctor. This constructor does nothing, and loads nothing. But it initializes the empty schema props.



DatabaseSchema
public DatabaseSchema(String dbDriverName, String url, Properties dbDriverProperties, Properties dbSchemaProperties) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, SQLException(Code)
Connects to the database, this method does not rely on global property values, instead, each property has to be provided explicitly.
Parameters:
  dbDriverName - is the name of the class that conforms tothe DatabaseDriver API. This class will be dynamically loaded.
Parameters:
  url - is the database url
Parameters:
  dbDriverProperties - holds properties specific to thedatabase driver.
Parameters:
  dbSchemaProperties - holds properties specific to thedatabase schema.
exception:
  ClassNotFoundException - if the driver for the databasecannot be loaded. You might want to check your CLASSPATH, too.
exception:
  NoSuchMethodException - if the driver's constructor interfacedoes not comply with the database driver API.
exception:
  InstantiationException - if the driver class is an abstractclass instead of a concrete implementation.
exception:
  IllegalAccessException - if the constructor for the driverclass it not publicly accessible to this package.
exception:
  InvocationTargetException - if the constructor of the driverthrows an exception while being dynamically loaded.
exception:
  SQLException - if the driver for the database can beloaded, but faults when initially accessing the database



DatabaseSchema
public DatabaseSchema(String dbDriverName, String propertyPrefix) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, SQLException(Code)
Connects to the database as specified by the properties, and checks the schema implementation. Makes heavy use of global property values.
Parameters:
  dbDriverName - is the name of the class that conforms tothe DatabaseDriver API. This class will be dynamically loaded.If the passed value is null, which should be thedefault, the value of property vds.db.*.driver is taken.
Parameters:
  propertyPrefix - is the property prefix string to use.
exception:
  ClassNotFoundException - if the driver for the databasecannot be loaded. You might want to check your CLASSPATH, too.
exception:
  NoSuchMethodException - if the driver's constructor interfacedoes not comply with the database driver API.
exception:
  InstantiationException - if the driver class is an abstractclass instead of a concrete implementation.
exception:
  IllegalAccessException - if the constructor for the driverclass it not publicly accessible to this package.
exception:
  InvocationTargetException - if the constructor of the driverthrows an exception while being dynamically loaded.
exception:
  SQLException - if the driver for the database can beloaded, but faults when initially accessing the database



DatabaseSchema
public DatabaseSchema(DatabaseDriver driver, String propertyPrefix) throws SQLException, ClassNotFoundException, IOException(Code)
Associates a schema with a given database driver.
Parameters:
  driver - is an instance conforming to the DatabaseDriver API.
Parameters:
  propertyPrefix - is the property prefix string to use.
exception:
  SQLException - if the driver for the database can beloaded, but faults when initially accessing the database




Method Detail
cachingMakesSense
public boolean cachingMakesSense()(Code)
pass-thru to driver. true, if it is feasible to cache results from the driverfalse, if requerying the driver is sufficiently fast (e.g. driveris in main memory, or driver does caching itself).



close
public void close() throws SQLException(Code)
Disassociate from the database driver before finishing. Mind that performing this action may throw NullPointerException in later stages!



finalize
protected void finalize() throws Throwable(Code)
Disassociate the database driver cleanly.



loadSchema
public static DatabaseSchema loadSchema(String dbSchemaName, String propertyPrefix, Object[] arguments) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException(Code)
Instantiates the appropriate leaf schema according to property values. This method is a factory.
Parameters:
  dbSchemaName - is the name of the class that conforms tothe DatabaseSchema API. This class will be dynamically loaded.If the passed value is null, which should be thedefault, the value of property vds.db.schema is taken.
Parameters:
  propertyPrefix - is the property prefix string to use.
Parameters:
  arguments - are arguments to the constructor of the driverto load. Please use "new Object[0]" for the default constructor.
exception:
  ClassNotFoundException - if the schema for the databasecannot be loaded. You might want to check your CLASSPATH, too.
exception:
  NoSuchMethodException - if the schema's constructor interfacedoes not comply with the database driver API.
exception:
  InstantiationException - if the schema class is an abstractclass instead of a concrete implementation.
exception:
  IllegalAccessException - if the constructor for the schemaclass it not publicly accessible to this package.
exception:
  InvocationTargetException - if the constructor of the schemathrows an exception while being dynamically loaded.
See Also:   org.griphyn.vdl.util.ChimeraProperties



loadSchema
public static DatabaseSchema loadSchema(String propertyPrefix) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException(Code)
Convenience method instantiates the appropriate child according to property values. Effectively, the following is being called:
 loadSchema( null, propertyPrefix, new Object[0] );
 

Parameters:
  propertyPrefix - is the property prefix string to use.
exception:
  ClassNotFoundException - if the schema for the databasecannot be loaded. You might want to check your CLASSPATH, too.
exception:
  NoSuchMethodException - if the schema's constructor interfacedoes not comply with the database driver API.
exception:
  InstantiationException - if the schema class is an abstractclass instead of a concrete implementation.
exception:
  IllegalAccessException - if the constructor for the schemaclass it not publicly accessible to this package.
exception:
  InvocationTargetException - if the constructor of the schemathrows an exception while being dynamically loaded.
See Also:   DatabaseSchema.loadSchema(String,String,Object[])
See Also:   org.griphyn.vdl.util.ChimeraProperties



longOrNull
protected void longOrNull(PreparedStatement ps, int pos, long l) throws SQLException(Code)
Adds a BIGINT or a SQL-NULL at the current prepared statement position, depending if the value is -1 or not. A value of -1 will lead to SQL-NULL.
Parameters:
  ps - is the prepared statement to extend
Parameters:
  pos - is the position at which to insert the value
Parameters:
  l - is the long to use, which may be null.



makeNotNull
protected String makeNotNull(String s)(Code)
Converts any given string into a guaranteed non-null value. Especially the definition triples use empty strings instead of null values.
Parameters:
  s - is the string object to look at, which may be null. a string that may be empty, but is not null.



stringOrNull
protected void stringOrNull(PreparedStatement ps, int pos, String s) throws SQLException(Code)
Adds a string or a SQL-NULL at the current prepared statement position, depending if the String value is null or not.
Parameters:
  ps - is the prepared statement to extend
Parameters:
  pos - is the position at which to insert the value
Parameters:
  s - is the String to use, which may be null.



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.