1 package org.apache.ojb.odmg.states; 2 3 17 18 import org.apache.ojb.odmg.ObjectEnvelope; 19 import org.apache.ojb.broker.PersistenceBrokerException; 20 21 24 public class StateTransient extends ModificationState 25 { 26 private static StateTransient _instance = new StateTransient(); 27 28 31 private StateTransient() 32 { 33 } 34 35 38 public static StateTransient getInstance() 39 { 40 return _instance; 41 } 42 43 46 public ModificationState markClean() 47 { 48 return this; 49 } 50 51 54 public ModificationState markDelete() 55 { 56 return this; 57 } 58 59 62 public ModificationState markDirty() 63 { 64 return this; 65 } 66 67 70 public ModificationState markNew() 71 { 72 return StateNewClean.getInstance(); 73 } 74 75 78 public ModificationState markOld() 79 { 80 return this; 81 } 82 83 86 public boolean needsInsert() 87 { 88 return false; 89 } 90 91 94 public void checkpoint(ObjectEnvelope mod) throws PersistenceBrokerException 95 { 96 } 97 98 99 102 public void commit(ObjectEnvelope mod) throws PersistenceBrokerException 103 { 104 } 105 106 109 public void rollback(ObjectEnvelope mod) 110 { 111 } 112 113 public boolean isTransient() 114 { 115 return true; 116 } 117 } 118 | Popular Tags |