1 23 24 package org.continuent.sequoia.driver; 25 26 import java.sql.SQLException ; 27 28 35 public class Savepoint implements java.sql.Savepoint 36 { 37 private int savepointId; 38 39 private String savepointName; 40 41 46 public Savepoint(int savepointId) 47 { 48 this.savepointId = savepointId; 49 } 50 51 56 public Savepoint(String savepointName) 57 { 58 this.savepointName = savepointName; 59 } 60 61 64 public int getSavepointId() throws SQLException 65 { 66 if (this.savepointName != null) 67 throw new SQLException ("This is a named savepoint"); 68 69 return this.savepointId; 70 } 71 72 75 public String getSavepointName() throws SQLException 76 { 77 if (this.savepointName == null) 78 throw new SQLException ("This is an unnamed savepoint"); 79 80 return this.savepointName; 81 } 82 } 83 | Popular Tags |