View Javadoc
1 package net.sourceforge.backpedal.impl.core; 2 3 import net.sourceforge.backpedal.api.core.BackpedalFactory; 4 import net.sourceforge.backpedal.api.core.BackpedalStatementEssentials; 5 import net.sourceforge.backpedal.api.core.ParsedStatement; 6 import net.sourceforge.backpedal.api.db.BindVariableSet; 7 import net.sourceforge.backpedal.impl.db.BindVariableSetImpl; 8 import net.sourceforge.backpedal.impl.AbstractComponent; 9 10 import java.util.Collection; 11 12 import org.apache.commons.logging.Log; 13 import org.apache.commons.logging.LogFactory; 14 15 public class BackpedalFactoryImpl implements BackpedalFactory { 16 public BackpedalStatementEssentials createPreparedStatementEssentials(ParsedStatement backpedalStatement,Collection backpedalBindVariableSets) { 17 final PreparedStatementEssentials preparedStatementEssentials = new PreparedStatementEssentials(backpedalStatement,backpedalBindVariableSets); 18 enable(preparedStatementEssentials); 19 return preparedStatementEssentials; 20 } 21 22 private void enable(Object o) { 23 if ( o instanceof AbstractComponent ) { 24 final Log log = LogFactory.getLog(o.getClass()); 25 ((AbstractComponent)o).enableLogging(log); 26 } 27 } 28 29 public BindVariableSet createBindVariableSet() { 30 return new BindVariableSetImpl(); 31 } 32 33 public ParsedStatement createParsedStatement(String originalSql, String mainKeyword, String[] whereCols, String[] changedCols, String tableName) { 34 return new ParsedStatementImpl(originalSql, mainKeyword,whereCols,changedCols,tableName); 35 } 36 }

This page was automatically generated by Maven