public void reset() { // Compatibility for Oracle 9 and above is checked in the setup() method Oracle9Platform platform = (Oracle9Platform) getSession().getPlatform(); // platform.setPrintCalendarIntoTimestampTZ(this.oldPrintingValue); platform.setShouldBindAllParameters(this.oldBindingValue); // delete myself UnitOfWork uow = getSession().acquireUnitOfWork(); uow.deleteObject(this); uow.commit(); }
public void setup() { if (!(getSession().getPlatform() instanceof Oracle9Platform)) { throw new TestWarningException( "Test is only supported on Oracle9 platform and above, as TIMESTAMPTZ is used"); } Oracle9Platform platform = (Oracle9Platform) getSession().getPlatform(); // this.oldPrintingValue = platform.getPrintCalendarIntoTimestampTZ(); this.oldBindingValue = platform.shouldBindAllParameters(); // platform.setPrintCalendarIntoTimestampTZ(Boolean.TRUE); platform.setShouldBindAllParameters(true); // write myself out UnitOfWork uow = getSession().acquireUnitOfWork(); uow.registerObject(this); uow.commit(); }