1 21 22 package org.apache.derby.iapi.db; 23 24 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext; 25 import org.apache.derby.iapi.sql.conn.ConnectionUtil; 26 import org.apache.derby.iapi.error.StandardException; 27 import org.apache.derby.iapi.error.PublicAPI; 28 import java.sql.SQLException ; 29 30 41 42 public abstract class ConnectionInfo 43 { 44 45 46 private ConnectionInfo() {} 47 48 66 public static Long lastAutoincrementValue(String schemaName, 67 String tableName, 68 String columnName) 69 throws SQLException 70 { 71 LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); 73 return lcc.lastAutoincrementValue(schemaName, tableName, columnName); 74 } 75 76 81 public static long nextAutoincrementValue(String schemaName, 82 String tableName, 83 String columnName 84 ) 85 throws SQLException 86 { 87 LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); 88 try 89 { 90 return 91 lcc.nextAutoincrementValue(schemaName, tableName, columnName); 92 } 93 catch (StandardException se) 94 { 95 throw PublicAPI.wrapStandardException(se); 96 } 97 } 98 } 99 100 | Popular Tags |