Java Doc for InMemorySchema.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
      org.griphyn.vdl.dbschema.InMemorySchema

All known Subclasses:   org.griphyn.vdl.dbschema.SingleFileSchema,
InMemorySchema
public class InMemorySchema extends DatabaseSchema implements VDC(Code)
This is a class that falls back not on a real database backend, but rather on an existing Definitions data structure in main memory. This schema is for internal use only.


author:
   Jens-S. Vöckler
author:
   Yong Zhao
version:
   $Revision: 50 $
See Also:   org.griphyn.vdl.dbdriver
See Also:   org.griphyn.vdl.classes.Definitions


Field Summary
protected  Definitionsm_memory
     Stores a reference to the in-memory data structure that hold all definitions that we can access from within this instance.

Constructor Summary
protected  InMemorySchema()
     Default ctor does nothing.
public  InMemorySchema(Definitions memory)
     Fakes a connect to the database.

Method Summary
public  Definitionsbackdoor()
     Dirty hack: Returns a reference to the in-memory database for preliminary routing into DAXes.
public  booleancachingMakesSense()
     Pass-thru to driver.
public  booleancontainsDefinition(Definition definition)
     Check with the backend database, if the given definition exists.
public  booleandeleteDefinition(Definition definition)
     Delete a specific Definition objects from the database.
public  java.util.ListdeleteDefinition(String namespace, String name, String version, int type)
     Delete one or more definitions from the backend database.
public  DefinitionloadDefinition(String namespace, String name, String version, int type)
     Loads a single Definition from the backend database into an Java object. This method does not allow wildcarding!
Parameters:
  namespace - namespace, null will be converted into empty string
Parameters:
  name - name, null will be converted into empty string
Parameters:
  version - version, null will be converted into empty string
Parameters:
  type - type of the definition (TR or DV), must not be -1.
public  booleansaveDefinition(Definition definition, boolean overwrite)
     Saves a Definition, that is either a Transformation or Derivation, into the backend database.
protected  booleanscalarContainsLfn(Scalar scalar, String lfn, int link)
     This helper function checks, if a given Scalar instance contains the specified logical filename as LFN instance anywhere in its sub-structures.
Parameters:
  scalar - is a Scalar instance to check
Parameters:
  lfn - is a logical filename string to check for
Parameters:
  link - is the linkage type of the lfn.
public  java.util.ListsearchDefinition(String namespace, String name, String version, int type)
     Search the database for definitions by ns::name:version triple and by type (either Transformation or Derivation).
public  java.util.ListsearchFilename(String lfn, int link)
     Searches the database for all derivations that contain a certain LFN. The linkage is an additional constraint.

Field Detail
m_memory
protected Definitions m_memory(Code)
Stores a reference to the in-memory data structure that hold all definitions that we can access from within this instance.




Constructor Detail
InMemorySchema
protected InMemorySchema()(Code)
Default ctor does nothing.



InMemorySchema
public InMemorySchema(Definitions memory) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, SQLException, IOException(Code)
Fakes a connect to the database. This class never uses any database, but instead applies all data to the provided reference to the in-memory structure. Subclasses may refine this view to work with files or URLs.
Parameters:
  memory - is a reference to an existing in-memory Javaobject holding all our necessary definitions.




Method Detail
backdoor
public Definitions backdoor()(Code)
Dirty hack: Returns a reference to the in-memory database for preliminary routing into DAXes. This is to avoid the duplication of DVs in memory, as memory becomes quickly a scarce resource. a reference to the in-memory database.



cachingMakesSense
public boolean cachingMakesSense()(Code)
Pass-thru to driver. Always returns false, as the backend is main memory. 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).



containsDefinition
public boolean containsDefinition(Definition definition) throws SQLException(Code)
Check with the backend database, if the given definition exists.
Parameters:
  definition - is a Definition object to search for true, if the Definition exists, false if not found



deleteDefinition
public boolean deleteDefinition(Definition definition) throws SQLException(Code)
Delete a specific Definition objects from the database. No wildcard matching will be done. "Fake" definitions are permissable, meaning it just has the secondary key triple.

This method is not implemented!
Parameters:
  definition - is the definition specification to delete true is something was deleted, false if non existent.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   




deleteDefinition
public java.util.List deleteDefinition(String namespace, String name, String version, int type) throws SQLException(Code)
Delete one or more definitions from the backend database. Depending on the matchAll flag the key triple parameters may be wildcards. Wildcards are expressed as null value.

This method is not implemented!
Parameters:
  namespace - namespace
Parameters:
  name - name
Parameters:
  version - version
Parameters:
  type - definition type (TR or DV) a list of definitions that were deleted.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   




loadDefinition
public Definition loadDefinition(String namespace, String name, String version, int type) throws SQLException(Code)
Loads a single Definition from the backend database into an Java object. This method does not allow wildcarding!
Parameters:
  namespace - namespace, null will be converted into empty string
Parameters:
  name - name, null will be converted into empty string
Parameters:
  version - version, null will be converted into empty string
Parameters:
  type - type of the definition (TR or DV), must not be -1. the Definition as specified, or null if not found.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   InMemorySchema.saveDefinition(Definition,boolean)
See Also:   InMemorySchema.searchDefinition(String,String,String,int)



saveDefinition
public boolean saveDefinition(Definition definition, boolean overwrite) throws SQLException(Code)
Saves a Definition, that is either a Transformation or Derivation, into the backend database.
Parameters:
  definition - is the new Definition to store.
Parameters:
  overwrite - true, if existing defitions will be overwritten bynew ones with the same primary (or secondary) key (-set), or false,if a new definition will be rejected on key matches. true, if the backend database was changed, orfalse, if the definition was not accepted into the backend.
See Also:   org.griphyn.vdl.classes.Definition
See Also:   org.griphyn.vdl.classes.Transformation
See Also:   org.griphyn.vdl.classes.Derivation
See Also:   InMemorySchema.loadDefinition(String,String,String,int)
See Also:   InMemorySchema.deleteDefinition(String,String,String,int)
See Also:   



scalarContainsLfn
protected boolean scalarContainsLfn(Scalar scalar, String lfn, int link)(Code)
This helper function checks, if a given Scalar instance contains the specified logical filename as LFN instance anywhere in its sub-structures.
Parameters:
  scalar - is a Scalar instance to check
Parameters:
  lfn - is a logical filename string to check for
Parameters:
  link - is the linkage type of the lfn. if -1, do not check the linkage type. true, if the file was found



searchDefinition
public java.util.List searchDefinition(String namespace, String name, String version, int type) throws SQLException(Code)
Search the database for definitions by ns::name:version triple and by type (either Transformation or Derivation). This version of the search allows for jokers expressed as null value.

This method is not implemented!
Parameters:
  namespace - namespace, null to match any namespace
Parameters:
  name - name, null to match any name
Parameters:
  version - version, null to match any version
Parameters:
  type - type of definition, see below, or -1 as wildcard a list of Definition items, which may be empty
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   InMemorySchema.loadDefinition(String,String,String,int)




searchFilename
public java.util.List searchFilename(String lfn, int link) throws SQLException(Code)
Searches the database for all derivations that contain a certain LFN. The linkage is an additional constraint. This method does not allow jokers.
Parameters:
  lfn - the LFN name
Parameters:
  link - the linkage type of the LFN a list of Definition items that match the criterion.
See Also:   org.griphyn.vdl.classes.LFN.NONE
See Also:   org.griphyn.vdl.classes.LFN.INPUT
See Also:   org.griphyn.vdl.classes.LFN.OUTPUT
See Also:   org.griphyn.vdl.classes.LFN.INOUT



Fields inherited from org.griphyn.vdl.dbschema.DatabaseSchema
protected DatabaseDriver m_dbdriver(Code)(Java Doc)
protected Properties m_dbschemaprops(Code)(Java Doc)

Methods inherited from org.griphyn.vdl.dbschema.DatabaseSchema
public boolean cachingMakesSense()(Code)(Java Doc)
public void close() throws SQLException(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
public static DatabaseSchema loadSchema(String dbSchemaName, String propertyPrefix, Object[] arguments) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException(Code)(Java Doc)
public static DatabaseSchema loadSchema(String propertyPrefix) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException(Code)(Java Doc)
protected void longOrNull(PreparedStatement ps, int pos, long l) throws SQLException(Code)(Java Doc)
protected String makeNotNull(String s)(Code)(Java Doc)
protected void stringOrNull(PreparedStatement ps, int pos, String s) throws SQLException(Code)(Java Doc)

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.