Package hec.io

Class AbstractDataStorage

java.lang.Object
hec.io.AbstractDataStorage
All Implemented Interfaces:
DataStorage
Direct Known Subclasses:
DBFDataStorage

public abstract class AbstractDataStorage extends Object implements DataStorage
  • Constructor Details

    • AbstractDataStorage

      public AbstractDataStorage()
  • Method Details

    • getObjectCount

      public int getObjectCount()
      Specified by:
      getObjectCount in interface DataStorage
    • getFilename

      public String getFilename()
      Specified by:
      getFilename in interface DataStorage
    • callNativeMethod

      public Object callNativeMethod(Object obj)
      call a native method in the DataStore base on the class type of obj.
      Specified by:
      callNativeMethod in interface DataStorage
    • getMethodsByName

      protected Method[] getMethodsByName(String methodName)
      return a list of methods that have the methodName
    • addNewObject2

      public DataObject addNewObject2(Object obj)
      add the object returning the object
      Specified by:
      addNewObject2 in interface DataStorage
    • addNewObject

      public long addNewObject(Object obj)
      Description copied from interface: DataStorage
      add a new object to the DataStore return its id.
      Specified by:
      addNewObject in interface DataStorage
    • save

      public boolean save()
      Specified by:
      save in interface DataStorage
    • removeObject

      public boolean removeObject(long objId, String objClass)
      Description copied from interface: DataStorage
      remove an object
      Specified by:
      removeObject in interface DataStorage
    • removeObject

      public boolean removeObject(long[] objId, String objClass)
      Specified by:
      removeObject in interface DataStorage
    • workspaceClosing

      public void workspaceClosing()
      Specified by:
      workspaceClosing in interface DataStorage
    • loadObject

      public Object loadObject(String name, String objClass)
      method required by DataStorage for local access to objects from rmiDataList
      Specified by:
      loadObject in interface DataStorage
    • backupData

      public boolean backupData(String backupDir, DataObject obj)
      Specified by:
      backupData in interface DataStorage
    • reload

      public boolean reload()
      called when we're supposed to dump all our in memory data and reload from disk.
      Specified by:
      reload in interface DataStorage
    • getLastModifiedTime

      public long getLastModifiedTime()
      Specified by:
      getLastModifiedTime in interface DataStorage
    • compress

      public void compress()
      This method is used to compress a datafile. Some data storage implemenations will buffer the record deletes by marking a delete flag. Call this to remove those records.
      Specified by:
      compress in interface DataStorage