1 16 17 package javax.jdo.spi; 18 19 import java.util.BitSet ; 20 21 import javax.jdo.PersistenceManager; 22 23 34 public interface StateManager { 35 36 41 byte replacingFlags(PersistenceCapable pc); 42 43 54 StateManager replacingStateManager (PersistenceCapable pc, StateManager sm); 55 56 67 boolean isDirty(PersistenceCapable pc); 68 69 82 boolean isTransactional(PersistenceCapable pc); 83 84 94 boolean isPersistent(PersistenceCapable pc); 95 96 108 boolean isNew(PersistenceCapable pc); 109 110 121 boolean isDeleted(PersistenceCapable pc); 122 123 127 PersistenceManager getPersistenceManager (PersistenceCapable pc); 128 129 136 void makeDirty (PersistenceCapable pc, String fieldName); 137 138 145 Object getObjectId (PersistenceCapable pc); 146 147 154 Object getTransactionalObjectId (PersistenceCapable pc); 155 156 162 Object getVersion (PersistenceCapable pc); 163 164 170 boolean isLoaded (PersistenceCapable pc, int field); 171 172 178 void preSerialize (PersistenceCapable pc); 179 180 186 boolean getBooleanField (PersistenceCapable pc, int field, boolean currentValue); 187 188 194 char getCharField (PersistenceCapable pc, int field, char currentValue); 195 196 202 byte getByteField (PersistenceCapable pc, int field, byte currentValue); 203 204 210 short getShortField (PersistenceCapable pc, int field, short currentValue); 211 212 218 int getIntField (PersistenceCapable pc, int field, int currentValue); 219 220 226 long getLongField (PersistenceCapable pc, int field, long currentValue); 227 228 234 float getFloatField (PersistenceCapable pc, int field, float currentValue); 235 236 242 double getDoubleField (PersistenceCapable pc, int field, double currentValue); 243 244 250 String getStringField (PersistenceCapable pc, int field, String currentValue); 251 252 258 Object getObjectField (PersistenceCapable pc, int field, Object currentValue); 259 260 265 void setBooleanField (PersistenceCapable pc, int field, boolean currentValue, boolean newValue); 266 267 272 void setCharField (PersistenceCapable pc, int field, char currentValue, char newValue); 273 274 279 void setByteField (PersistenceCapable pc, int field, byte currentValue, byte newValue); 280 281 286 void setShortField (PersistenceCapable pc, int field, short currentValue, short newValue); 287 288 293 void setIntField (PersistenceCapable pc, int field, int currentValue, int newValue); 294 295 300 void setLongField (PersistenceCapable pc, int field, long currentValue, long newValue); 301 302 307 void setFloatField (PersistenceCapable pc, int field, float currentValue, float newValue); 308 309 314 void setDoubleField (PersistenceCapable pc, int field, double currentValue, double newValue); 315 316 321 void setStringField (PersistenceCapable pc, int field, String currentValue, String newValue); 322 323 328 void setObjectField (PersistenceCapable pc, int field, Object currentValue, Object newValue); 329 330 335 void providedBooleanField (PersistenceCapable pc, int field, boolean currentValue); 336 337 342 void providedCharField (PersistenceCapable pc, int field, char currentValue); 343 344 349 void providedByteField (PersistenceCapable pc, int field, byte currentValue); 350 351 356 void providedShortField (PersistenceCapable pc, int field, short currentValue); 357 358 363 void providedIntField (PersistenceCapable pc, int field, int currentValue); 364 365 370 void providedLongField (PersistenceCapable pc, int field, long currentValue); 371 372 377 void providedFloatField (PersistenceCapable pc, int field, float currentValue); 378 379 384 void providedDoubleField (PersistenceCapable pc, int field, double currentValue); 385 386 391 void providedStringField (PersistenceCapable pc, int field, String currentValue); 392 393 398 void providedObjectField (PersistenceCapable pc, int field, Object currentValue); 399 400 405 boolean replacingBooleanField (PersistenceCapable pc, int field); 406 407 412 char replacingCharField (PersistenceCapable pc, int field); 413 414 419 byte replacingByteField (PersistenceCapable pc, int field); 420 421 426 short replacingShortField (PersistenceCapable pc, int field); 427 428 433 int replacingIntField (PersistenceCapable pc, int field); 434 435 440 long replacingLongField (PersistenceCapable pc, int field); 441 442 447 float replacingFloatField (PersistenceCapable pc, int field); 448 449 454 double replacingDoubleField (PersistenceCapable pc, int field); 455 456 461 String replacingStringField (PersistenceCapable pc, int field); 462 463 468 Object replacingObjectField (PersistenceCapable pc, int field); 469 470 476 Object replacingObjectId (PersistenceCapable pc, Object oid); 477 478 484 Object replacingVersion (PersistenceCapable pc, Object version); 485 486 491 void providedLoadedFieldList (PersistenceCapable pc, BitSet loaded); 492 493 499 BitSet replacingLoadedFieldList (PersistenceCapable pc, BitSet loaded); 500 501 506 void providedModifiedFieldList (PersistenceCapable pc, BitSet modified); 507 508 514 BitSet replacingModifiedFieldList (PersistenceCapable pc, BitSet modified); 515 } 516 517 | Popular Tags |