1 16 17 package org.apache.cocoon.components.modules.database; 18 19 import java.sql.Connection ; 20 import java.sql.SQLException ; 21 import java.sql.Statement ; 22 import java.util.Map ; 23 24 import org.apache.avalon.framework.configuration.Configuration; 25 import org.apache.avalon.framework.configuration.ConfigurationException; 26 import org.apache.avalon.framework.thread.ThreadSafe; 27 28 37 public class IfxSerialAutoIncrementModule implements AutoIncrementModule, ThreadSafe { 38 39 public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf, 40 Connection conn, Statement stmt, Map objectModel ) 41 throws SQLException , ConfigurationException { 42 43 return new Integer (((com.informix.jdbc.IfxStatement) stmt).getSerial()); 44 } 45 46 47 public boolean includeInQuery() { return false; } 48 49 50 public boolean includeAsValue() { return false; } 51 52 53 public Object getPreValue( Configuration tableConf, Configuration columnConf, Configuration modeConf, 54 Connection conn, Map objectModel ) throws SQLException , ConfigurationException { 55 56 return null; 57 } 58 59 public String getSubquery( Configuration tableConf, Configuration columnConf, Configuration modeConf ) 60 throws ConfigurationException { 61 62 return null; 63 } 64 65 } 66 | Popular Tags |