com.openexchange.admin.storage.sqlStorage
Class OXResourceSQLStorage

java.lang.Object
  extended by com.openexchange.admin.storage.interfaces.OXResourceStorageInterface
      extended by com.openexchange.admin.storage.sqlStorage.OXResourceSQLStorage
Direct Known Subclasses:
OXResourceMySQLStorage

public abstract class OXResourceSQLStorage
extends OXResourceStorageInterface

This class implements the global storage interface and creates a layer between the abstract storage definition and a storage in a SQL accessible database

Author:
d7, cutmasta

Constructor Summary
OXResourceSQLStorage()
           
 
Method Summary
abstract  void change(Context ctx, Resource res)
          Change resource in datastore
abstract  void changeLastModified(int resource_id, Context ctx, Connection write_ox_con)
           
abstract  int create(Context ctx, Resource res)
           
abstract  void createRecoveryData(int resource_id, Context ctx, Connection con)
          fetch data from resource and insert in del_resource
abstract  void delete(Context ctx, int resource_id)
           
abstract  void deleteAllRecoveryData(Context ctx, Connection con)
          Delete all data from del_resource for context
abstract  void deleteRecoveryData(int resource_id, Context ctx, Connection con)
          delete data from del_resource
abstract  Resource[] list(Context ctx, String pattern)
           
 
Methods inherited from class com.openexchange.admin.storage.interfaces.OXResourceStorageInterface
delete, getData, getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXResourceSQLStorage

public OXResourceSQLStorage()
Method Detail

changeLastModified

public abstract void changeLastModified(int resource_id,
                                        Context ctx,
                                        Connection write_ox_con)
                                 throws StorageException
Specified by:
changeLastModified in class OXResourceStorageInterface
Throws:
StorageException

change

public abstract void change(Context ctx,
                            Resource res)
                     throws StorageException
Description copied from class: OXResourceStorageInterface
Change resource in datastore

Specified by:
change in class OXResourceStorageInterface
Throws:
StorageException

create

public abstract int create(Context ctx,
                           Resource res)
                    throws StorageException
Specified by:
create in class OXResourceStorageInterface
Throws:
StorageException

createRecoveryData

public abstract void createRecoveryData(int resource_id,
                                        Context ctx,
                                        Connection con)
                                 throws StorageException
Description copied from class: OXResourceStorageInterface
fetch data from resource and insert in del_resource

Specified by:
createRecoveryData in class OXResourceStorageInterface
Throws:
StorageException

deleteAllRecoveryData

public abstract void deleteAllRecoveryData(Context ctx,
                                           Connection con)
                                    throws StorageException
Description copied from class: OXResourceStorageInterface
Delete all data from del_resource for context

Specified by:
deleteAllRecoveryData in class OXResourceStorageInterface
Throws:
StorageException

delete

public abstract void delete(Context ctx,
                            int resource_id)
                     throws StorageException
Throws:
StorageException

deleteRecoveryData

public abstract void deleteRecoveryData(int resource_id,
                                        Context ctx,
                                        Connection con)
                                 throws StorageException
Description copied from class: OXResourceStorageInterface
delete data from del_resource

Specified by:
deleteRecoveryData in class OXResourceStorageInterface
Throws:
StorageException

list

public abstract Resource[] list(Context ctx,
                                String pattern)
                         throws StorageException
Specified by:
list in class OXResourceStorageInterface
Throws:
StorageException