1 5 6 package org.springframework.samples.petclinic.toplink; 7 8 import oracle.toplink.internal.databaseaccess.HSQLPlatform; 9 import oracle.toplink.queryframework.ValueReadQuery; 10 11 24 public class HSQLPlatformWithNativeSequence extends HSQLPlatform { 25 26 public HSQLPlatformWithNativeSequence() { 27 setUsesNativeSequencing(true); 28 } 29 30 public boolean supportsNativeSequenceNumbers() { 31 return true; 32 } 33 34 public boolean shouldNativeSequenceAcquireValueAfterInsert() { 35 return true; 36 } 37 38 public ValueReadQuery buildSelectQueryForNativeSequence() { 39 return new ValueReadQuery("CALL IDENTITY()"); 40 } 41 42 } 43 | Popular Tags |