1 21 package oracle.toplink.essentials.internal.sequencing; 23 24 import oracle.toplink.essentials.internal.sequencing.Sequencing; 25 import oracle.toplink.essentials.threetier.ClientSession; 26 27 37 class ClientSessionSequencing implements Sequencing { 38 protected ClientSession clientSession; 40 41 protected SequencingServer sequencingServer; 43 44 50 public static boolean sequencingServerExists(ClientSession cs) { 51 return cs.getParent().getSequencingServer() != null; 52 } 53 54 58 public ClientSessionSequencing(ClientSession clientSession) { 59 this.clientSession = clientSession; 60 sequencingServer = clientSession.getParent().getSequencingServer(); 61 } 62 63 67 public boolean shouldAcquireValueAfterInsert(Class cls) { 68 return sequencingServer.shouldAcquireValueAfterInsert(cls); 69 } 70 71 75 public int whenShouldAcquireValueForAll() { 76 return sequencingServer.whenShouldAcquireValueForAll(); 77 } 78 79 83 public boolean shouldOverrideExistingValue(Class cls, Object existingValue) { 84 return sequencingServer.shouldOverrideExistingValue(cls, existingValue); 85 } 86 87 94 public Object getNextValue(Class cls) { 95 return sequencingServer.getNextValue(clientSession, cls); 96 } 97 } 98 | Popular Tags |