1 23 24 package com.sun.jdo.spi.persistence.support.sqlstore; 25 26 51 public interface StateManager 52 { 53 static final byte LOAD_REQUIRED = (byte)1; 54 55 static final byte READ_OK = (byte)-1; 56 57 static final byte READ_WRITE_OK = (byte)0; 58 59 60 64 void makePersistent(PersistenceManager pm, Object pc); 65 66 72 void deletePersistent(); 73 74 83 void updatePersistent(StateManager next); 84 85 91 void refreshPersistent(); 92 93 99 void commit(boolean retainValues); 100 101 102 108 void rollback(boolean retainValues); 109 110 116 void flushed(); 117 118 123 boolean isProcessed(); 124 125 128 void setPersistenceManager(com.sun.jdo.api.persistence.support.PersistenceManager pm); 129 130 133 com.sun.jdo.api.persistence.support.PersistenceManager getPersistenceManager(); 134 135 138 com.sun.jdo.api.persistence.support.PersistenceManager getPersistenceManagerInternal(); 139 140 143 void setPersistent(Object obj); 144 145 148 Object getPersistent(); 149 150 153 void setObjectId(Object objectId); 154 155 158 Object getObjectId(); 159 160 163 PersistenceConfig getPersistenceConfig(); 164 165 169 void initialize(boolean persistentInDB); 170 171 174 void makePresent(String fieldName, Object value); 175 176 179 void makeDirty(String fieldName); 180 181 184 void applyUpdates(String fieldName, SCOCollection c); 185 186 189 void replaceObjectField(String fieldName, Object o); 190 191 197 void prepareToUpdatePhaseI(); 198 199 203 void prepareToUpdatePhaseII(java.util.HashSet phase3sms); 204 205 209 void prepareToUpdatePhaseIII(); 210 211 214 byte setFlags(byte flags); 216 217 220 void loadForRead(); 221 222 225 void loadForUpdate(); 226 227 239 242 boolean isDirty(); 243 244 247 boolean isTransactional(); 248 249 252 boolean isNew(); 253 254 257 boolean isDeleted(); 258 259 262 boolean isPersistent(); 263 264 268 boolean needsRegisterWithVersionConsistencyCache(); 269 270 274 boolean needsUpdateInVersionConsistencyCache(); 275 276 286 290 void prepareGetField(int fieldID); 291 292 boolean setBooleanField(int fieldNumber, boolean value); 293 294 boolean[] setBooleanArrayField(int fieldNumber, boolean[] value); 295 296 byte setByteField(int fieldNumber, byte value); 297 298 byte[] setByteArrayField(int fieldNumber, byte[] value); 299 300 short setShortField(int fieldNumber, short value); 301 302 short[] setShortArrayField(int fieldNumber, short[] value); 303 304 int setIntField(int fieldNumber, int value); 305 306 int[] setIntArrayField(int fieldNumber, int[] value); 307 308 long setLongField(int fieldNumber, long value); 309 310 long[] setLongArrayField(int fieldNumber, long[] value); 311 312 char setCharField(int fieldNumber, char value); 313 314 char setCharArrayField(int fieldNumber, char value); 315 316 float setFloatField(int fieldNumber, float value); 317 318 float[] setFloatArrayField(int fieldNumber, float[] value); 319 320 double setDoubleField(int fieldNumber, double value); 321 322 double[] setDoubleArrayField(int fieldNumber, double[] value); 323 324 String setStringField(int fieldNumber, String value); 325 326 String [] setStringArrayField(int fieldNumber, String [] value); 327 328 Object setObjectField(int fieldNumber, Object value); 329 330 Object [] setObjectArrayField(int fieldNumber, Object [] value); 331 332 336 void getLock(); 337 338 342 void releaseLock(); 343 344 349 Object getHiddenValue(int index); 350 351 357 void setHiddenValue(int index, Object value); 358 359 363 void setPresenceMaskBit(int index) ; 364 365 368 boolean getPresenceMaskBit(int index); 369 370 377 void markNotRegistered(); 378 379 384 void markVerifyAtDeregister(); 385 386 390 void addDependency(StateManager sm); 391 392 396 void resolveDependencies(); 397 398 402 void markReplacement(); 403 404 408 void release(); 409 410 415 boolean isValid(); 416 417 422 void setValid(); 423 424 429 void reload(); 430 431 435 boolean hasVersionConsistency(); 436 437 443 void copyFields(StateManager source); 444 445 451 boolean verifyPersistent(); 452 453 457 void setVerificationFailed(); 458 459 465 boolean isVerificationFailed(); 466 } 467 | Popular Tags |