Java Doc for StorageManager.java in  » Database-ORM » MMBase » org » mmbase » storage » 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 » MMBase » org.mmbase.storage 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mmbase.storage.StorageManager

All known Subclasses:   org.mmbase.storage.implementation.database.DatabaseStorageManager,
StorageManager
public interface StorageManager (Code)
The StorageManager interface defines how to access a storage device. It contains methods that can be used to query the storage, insert, update, or remove objects, or to change object definitions (adding fields, etc.).
author:
   Pierre van Rooden
since:
   MMBase-1.7
version:
   $Id: StorageManager.java,v 1.7 2005/10/02 16:16:43 michiel Exp $




Method Summary
public  voidbeginTransaction()
     Starts a transaction on this StorageManager instance.
public  voidchange(MMObjectNode node)
     Commit this node to the specified builder.
public  voidchange(MMObjectBuilder builder)
     Changes the storage of a builder to match its new configuration.
public  voidchange(CoreField field)
     Changes a field to the storage of this builder.
public  voidcommit()
     Closes any transaction that was started and commits all changes.
public  intcreate(MMObjectNode node)
     This method creates a new object in the storage, and registers the change.
public  voidcreate(MMObjectBuilder builder)
     Create a storage element to store the specified builder's objects.
public  voidcreate()
    
public  voidcreate(CoreField field)
     Creates a field and adds it to the storage of this builder.
public  intcreateKey()
     Gives an unique number for a new node, to be inserted in the storage.
public  voiddelete(MMObjectNode node)
    
public  voiddelete(MMObjectBuilder builder)
     Drops the storage of this builder.
public  voiddelete(CoreField field)
     Deletes a field from the storage of this builder.
public  booleanexists(MMObjectBuilder builder)
    
public  booleanexists()
     Determine if the basic storage elements exist Basic storage elements include the 'object' storage (where all objects and their types are registered).
public  byte[]getBinaryValue(MMObjectNode node, CoreField field)
     Retrieve a large binary object (byte array) for a specified object field.
public  InputStreamgetInputStreamValue(MMObjectNode node, CoreField field)
    
public  MMObjectNodegetNode(MMObjectBuilder builder, int number)
    
public  intgetNodeType(int number)
    
public  StringgetStringValue(MMObjectNode node, CoreField field)
     Retrieve a large text for a specified object field.
public  doublegetVersion()
     Returns the version of this factory implementation.
public  voidinit(StorageManagerFactory factory)
     Initializes the manager.
public  booleanrollback()
     Cancels any transaction that was started and rollback changes if possible.
public  intsize(MMObjectBuilder builder)
    
public  intsize()
    



Method Detail
beginTransaction
public void beginTransaction() throws StorageException(Code)
Starts a transaction on this StorageManager instance. All commands passed to the instance will be treated as being in this transaction. If transactions are not supported by the storage, no actual storage transaction is started, but the code continues as if it has.
throws:
  StorageException - if the transaction could not be created



change
public void change(MMObjectNode node) throws StorageException(Code)
Commit this node to the specified builder.
Parameters:
  node - The node to commit
throws:
  StorageException - if an error occurred during commit



change
public void change(MMObjectBuilder builder) throws StorageException(Code)
Changes the storage of a builder to match its new configuration.
Parameters:
  builder - the builder whose storage to change



change
public void change(CoreField field) throws StorageException(Code)
Changes a field to the storage of this builder.
Parameters:
  field - the CoreField of the field to change



commit
public void commit() throws StorageException(Code)
Closes any transaction that was started and commits all changes. If transactions are not supported by the storage, nothing really happens (as changes are allready committed), but the code continues as if it has.
throws:
  StorageException - if a transaction is not currently active, or an error occurred while committing



create
public int create(MMObjectNode node) throws StorageException(Code)
This method creates a new object in the storage, and registers the change. Only fields with states of DBSTATE_PERSISTENT or DBSTATE_SYSTEM are stored.
Parameters:
  node - The node to insert The (new) number for this node, or -1 if an error occurs.
throws:
  StorageException - if an error occurred during insert



create
public void create(MMObjectBuilder builder) throws StorageException(Code)
Create a storage element to store the specified builder's objects.
Parameters:
  builder - the builder to create the storage element for
throws:
  StorageException - if an error occurred during the creation of the storage element



create
public void create() throws StorageException(Code)
Create the basic elements for this storage
throws:
  StorageException - if an error occurred during the creation of the object storage



create
public void create(CoreField field) throws StorageException(Code)
Creates a field and adds it to the storage of this builder.
Parameters:
  field - the CoreField of the field to add



createKey
public int createKey() throws StorageException(Code)
Gives an unique number for a new node, to be inserted in the storage. This method should work with multiple mmbases unique number



delete
public void delete(MMObjectNode node) throws StorageException(Code)
Delete a node
Parameters:
  node - The node to delete
throws:
  StorageException - if an error occurred during delete



delete
public void delete(MMObjectBuilder builder) throws StorageException(Code)
Drops the storage of this builder.
Parameters:
  builder - the builder whose storage to drop



delete
public void delete(CoreField field) throws StorageException(Code)
Deletes a field from the storage of this builder.
Parameters:
  field - the CoreField of the field to delete



exists
public boolean exists(MMObjectBuilder builder) throws StorageException(Code)
Determine if a storage element exists for storing the given builder's objects
Parameters:
  builder - the builder to check true if the storage element exists, false if it doesn't
throws:
  StorageException - if an error occurred while querying the storage



exists
public boolean exists() throws StorageException(Code)
Determine if the basic storage elements exist Basic storage elements include the 'object' storage (where all objects and their types are registered). true if basic storage elements exist
throws:
  StorageException - if an error occurred while querying the storage



getBinaryValue
public byte[] getBinaryValue(MMObjectNode node, CoreField field) throws StorageException(Code)
Retrieve a large binary object (byte array) for a specified object field. Implement this method to allow for optimization of storing and retrieving binary objects.
Parameters:
  node - the node to retrieve the byte array from
Parameters:
  field - the CoreField of the field to retrieve the retrieved byte array
throws:
  StorageException - if an error occurred while retrieving the binary value



getInputStreamValue
public InputStream getInputStreamValue(MMObjectNode node, CoreField field) throws StorageException(Code)

since:
   MMBase-1.8



getNode
public MMObjectNode getNode(MMObjectBuilder builder, int number) throws StorageException(Code)
Select a node from a specified builder
Parameters:
  builder - The builder to select from
Parameters:
  number - the number of the node the MMObjectNode that was found, or null f it doesn't exist
throws:
  StorageException - if an error occurred during the get



getNodeType
public int getNodeType(int number) throws StorageException(Code)
Returns the nodetype for a specified nodereference
Parameters:
  number - the number of the node int the object type or -1 if not found
throws:
  StorageException - if an error occurred during selection



getStringValue
public String getStringValue(MMObjectNode node, CoreField field) throws StorageException(Code)
Retrieve a large text for a specified object field. Implement this method to allow for optimization of storing and retrieving large texts.
Parameters:
  node - the node to retrieve the text from
Parameters:
  field - the Type of the field to retrieve the retrieved text
throws:
  StorageException - if an error occurred while retrieving the text value



getVersion
public double getVersion()(Code)
Returns the version of this factory implementation. The factory uses this number to verify whether it can handle storage configuration files that list version requirements. the version as an integer



init
public void init(StorageManagerFactory factory) throws StorageException(Code)
Initializes the manager. Called by a StorageManagerFactory when instantiating the manager with the getStorageManager() method.
Parameters:
  factory - the StorageManagerFactory instance that created this storage manager.
throws:
  StorageConfigurationException - if the initialization failed



rollback
public boolean rollback() throws StorageException(Code)
Cancels any transaction that was started and rollback changes if possible. If transactions are not supported by the storage, nothing really happens (as changes are allready committed), but the code continues as if it has (through in that case it will return false). true if changes were rolled back, false if the transaction wascanceled but the storage does not support rollback
throws:
  StorageException - if a transaction is not currently active, or an error occurred during rollback



size
public int size(MMObjectBuilder builder) throws StorageException(Code)
Return the number of objects of a builder in the storage
Parameters:
  builder - the builder whose objects to count the number of objects the builder has
throws:
  StorageException - if the storage element for the builder does not exists



size
public int size() throws StorageException(Code)
Return the total number of objects in the storage the number of objects
throws:
  StorageException - if the basic storage elements do not exist



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