1 8 9 package com.sleepycat.persist; 10 11 import com.sleepycat.je.DatabaseException; 12 import com.sleepycat.je.DatabaseNotFoundException; 13 import com.sleepycat.je.Environment; import com.sleepycat.persist.evolve.IncompatibleClassException; 15 import com.sleepycat.persist.evolve.Mutations; 16 import com.sleepycat.persist.model.AnnotationModel; 17 import com.sleepycat.persist.model.EntityModel; 18 import com.sleepycat.persist.raw.RawStore; 19 20 32 public class StoreConfig implements Cloneable { 33 34 38 public static final StoreConfig DEFAULT = new StoreConfig(); 39 40 private boolean allowCreate; 41 private boolean exclusiveCreate; 42 private boolean transactional; 43 private boolean readOnly; 44 private boolean deferredWrite; 45 private EntityModel model; 46 private Mutations mutations; 47 48 51 public StoreConfig() { 52 } 53 54 57 public StoreConfig cloneConfig() { 58 try { 59 return (StoreConfig) clone(); 60 } catch (CloneNotSupportedException cannotHappen) { 61 return null; 62 } 63 } 64 65 73 public void setAllowCreate(boolean allowCreate) { 74 this.allowCreate = allowCreate; 75 } 76 77 80 public boolean getAllowCreate() { 81 return allowCreate; 82 } 83 84 92 public void setExclusiveCreate(boolean exclusiveCreate) { 93 this.exclusiveCreate = exclusiveCreate; 94 } 95 96 99 public boolean getExclusiveCreate() { 100 return exclusiveCreate; 101 } 102 103 111 public void setTransactional(boolean transactional) { 112 this.transactional = transactional; 113 } 114 115 118 public boolean getTransactional() { 119 return transactional; 120 } 121 122 130 public void setReadOnly(boolean readOnly) { 131 this.readOnly = readOnly; 132 } 133 134 137 public boolean getReadOnly() { 138 return readOnly; 139 } 140 141 157 public void setDeferredWrite(boolean deferredWrite) { 158 this.deferredWrite = deferredWrite; 159 } 160 161 164 public boolean getDeferredWrite() { 165 return deferredWrite; 166 } 167 168 174 public void setModel(EntityModel model) { 175 this.model = model; 176 } 177 178 181 public EntityModel getModel() { 182 return model; 183 } 184 185 205 public void setMutations(Mutations mutations) { 206 this.mutations = mutations; 207 } 208 209 213 public Mutations getMutations() { 214 return mutations; 215 } 216 } 217 | Popular Tags |