1 25 26 package org.snipsnap.jdbc; 27 28 import org.snipsnap.util.ConnectionManager; 29 30 import javax.sql.DataSource ; 31 32 38 39 public class FinderFactory { 40 private String statementRoot; 41 private DataSource ds; 42 43 public FinderFactory(DataSource ds, String statement) { 44 this.ds = ds; 45 this.statementRoot = statement + " "; 46 } 47 48 public Finder getFinder() { 49 return new Finder(ds, statementRoot); 50 } 51 52 public Finder getFinder(String statement) { 53 return new Finder(ds, statementRoot + statement); 54 } 55 } 56 | Popular Tags |