1 18 19 package sync4j.syncclient.sps.common; 20 21 import java.util.Vector ; 22 import java.util.Date ; 23 import java.util.Hashtable ; 24 25 26 33 public abstract class DataStore { 34 35 37 private String dataStoreName = null; 38 private RecordMetadata recordMetadata = null; 39 private Hashtable dataStoreProperties = null; 40 41 43 public DataStore (String dataStoreName, RecordMetadata recordMetadata) { 44 this.dataStoreName = dataStoreName; 45 this.recordMetadata = recordMetadata; 46 } 47 48 50 53 public Hashtable getDataStoreProperties() { 54 return this.dataStoreProperties; 55 } 56 57 60 public void setDataStoreProperties(Hashtable dataStoreProperties) { 61 this.dataStoreProperties = dataStoreProperties; 62 } 63 64 65 public String getDataStoreName() { 66 67 return this.dataStoreName; 68 69 } 70 71 public RecordMetadata getRecordMetadata() { 72 73 return this.recordMetadata; 74 75 } 76 77 84 public abstract Record newRecord(String key) 85 throws DataAccessException; 86 87 93 public abstract Record readRecord(Record record) 94 throws DataAccessException; 95 96 102 public abstract Record storeRecord(Record record) 103 throws DataAccessException; 104 105 111 public abstract void deleteRecord(Record record) 112 throws DataAccessException; 113 114 120 public abstract Vector findAllRecords() 121 throws DataAccessException; 122 123 132 public abstract Vector findRecords(char state, Date since) 133 throws DataAccessException; 134 135 142 public abstract Vector findRecords(RecordFilter recordFilter) 143 throws DataAccessException; 144 145 149 public abstract long getNextKey() 150 throws DataAccessException; 151 152 156 public abstract void startDBOperations() 157 throws DataAccessException; 158 159 163 public abstract void commitDBOperations() 164 throws DataAccessException;; 165 166 } | Popular Tags |