1 21 package net.sf.hajdbc.sql; 22 23 import java.sql.SQLException ; 24 25 import net.sf.hajdbc.Database; 26 import net.sf.hajdbc.Operation; 27 28 33 public class Savepoint extends SQLObject<java.sql.Savepoint , java.sql.Connection > implements java.sql.Savepoint 34 { 35 41 public Savepoint(Connection<?> connection, Operation<java.sql.Connection , java.sql.Savepoint > operation) throws SQLException 42 { 43 super(connection, operation, connection.getDatabaseCluster().getTransactionalExecutor(), connection.getDatabaseCluster().readLock()); 44 } 45 46 49 public int getSavepointId() throws SQLException 50 { 51 Operation<java.sql.Savepoint , Integer > operation = new Operation<java.sql.Savepoint , Integer >() 52 { 53 public Integer execute(Database database, java.sql.Savepoint savepoint) throws SQLException 54 { 55 return savepoint.getSavepointId(); 56 } 57 }; 58 59 return this.executeReadFromDriver(operation); 60 } 61 62 65 public String getSavepointName() throws SQLException 66 { 67 Operation<java.sql.Savepoint , String > operation = new Operation<java.sql.Savepoint , String >() 68 { 69 public String execute(Database database, java.sql.Savepoint savepoint) throws SQLException 70 { 71 return savepoint.getSavepointName(); 72 } 73 }; 74 75 return this.executeReadFromDriver(operation); 76 } 77 78 81 @Override 82 protected void close(java.sql.Savepoint savepoint) 83 { 84 } 86 } 87 | Popular Tags |