本文整理汇总了Java中org.apache.commons.dbutils.RowProcessor类的典型用法代码示例。如果您正苦于以下问题:Java RowProcessor类的具体用法?Java RowProcessor怎么用?Java RowProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RowProcessor类属于org.apache.commons.dbutils包,在下文中一共展示了RowProcessor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRowProcessor
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
public static synchronized RowProcessor getRowProcessor(Class<?> modelCls, ModelMeta modelMeta) {
if(ROW_PROCESSOR_MAP.containsKey(modelCls)) {
return ROW_PROCESSOR_MAP.get(modelCls);
}
RowProcessor rowProcessor = new BasicRowProcessor(new JdbcOrmBeanProcessor(modelCls, modelMeta));
ROW_PROCESSOR_MAP.put(modelCls, rowProcessor);
return rowProcessor;
}
示例2: netProcessor
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
public static RowProcessor netProcessor(Object... netConfig) {
getCurrentExplainers().add(new EntityNetSqlExplainer(netConfig));
return new BasicRowProcessor();
}
示例3: JdbcOrmBeanListHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
public JdbcOrmBeanListHandler(Class<T> type, RowProcessor convert) {
this.type = type;
this.convert = convert;
}
示例4: JdbcOrmBeanHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
public JdbcOrmBeanHandler(Class<T> type, RowProcessor convert) {
this.type = type;
this.convert = convert;
}
示例5: BeanMapHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Private Helper
*
* @param convert
* The <code>RowProcessor</code> implementation to use when
* converting rows into Beans
* @param columnIndex
* The values to use as keys in the Map are retrieved from the
* column at this index.
* @param columnName
* The values to use as keys in the Map are retrieved from the
* column with this name.
*/
private BeanMapHandler(Class<V> type, RowProcessor convert,
int columnIndex, String columnName) {
super();
this.type = type;
this.convert = convert;
this.columnIndex = columnIndex;
this.columnName = columnName;
}
示例6: KeyedHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/** Private Helper
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Maps
* @param columnIndex The values to use as keys in the Map are
* retrieved from the column at this index.
* @param columnName The values to use as keys in the Map are
* retrieved from the column with this name.
*/
private KeyedHandler(RowProcessor convert, int columnIndex,
String columnName) {
super();
this.convert = convert;
this.columnIndex = columnIndex;
this.columnName = columnName;
}
示例7: getList
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* For classes w/ nested objects such as AuditInfo
*
* @param clazz
* @param sql
* @param values
* @param convert
* @return
* @throws ServletException
* @throws SQLException
*/
public static List getList(Class clazz, String sql, ArrayList values, RowProcessor convert) throws ServletException, SQLException {
DataSource dataSource = null;
dataSource = DatabaseUtils.getZEPRSDataSource();
QueryRunner run = new QueryRunner(dataSource);
ResultSetHandler h = new BeanListHandler(clazz, convert);
// return the results in a new object generated by the BeanHandler.
List list = (List) run.query(sql, values.toArray(), h);
return list;
}
示例8: defaultRowProcessor
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* 默认的{@link RowProcessor}对象
* {@link ResultSet}转为Bean时使用{@link MysqlBeanProcessor}
*
* @see MysqlBeanProcessor
*/
public static RowProcessor defaultRowProcessor() {
return DEFAULT_ROW_PROCESSOR;
}
示例9: ResultSetIterator
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Constructor for ResultSetIterator.
* @param rs Wrap this <code>ResultSet</code> in an <code>Iterator</code>.
* @param convert The processor to use when converting a row into an
* <code>Object[]</code>. Defaults to a
* <code>BasicRowProcessor</code>.
*/
public ResultSetIterator(ResultSet rs, RowProcessor convert) {
this.rs = rs;
this.convert = convert;
}
示例10: BeanListHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Creates a new instance of BeanListHandler.
*
* @param type The Class that objects returned from <code>handle()</code>
* are created from.
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into beans.
*/
public BeanListHandler(Class<T> type, RowProcessor convert) {
this.type = type;
this.convert = convert;
}
示例11: MapHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Creates a new instance of MapHandler.
*
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Maps.
*/
public MapHandler(RowProcessor convert) {
super();
this.convert = convert;
}
示例12: BeanHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Creates a new instance of BeanHandler.
*
* @param type The Class that objects returned from <code>handle()</code>
* are created from.
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into beans.
*/
public BeanHandler(Class<T> type, RowProcessor convert) {
this.type = type;
this.convert = convert;
}
示例13: ArrayHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Creates a new instance of ArrayHandler.
*
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into arrays.
*/
public ArrayHandler(RowProcessor convert) {
super();
this.convert = convert;
}
示例14: MapListHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Creates a new instance of MapListHandler.
*
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Maps.
*/
public MapListHandler(RowProcessor convert) {
super();
this.convert = convert;
}
示例15: ArrayListHandler
import org.apache.commons.dbutils.RowProcessor; //导入依赖的package包/类
/**
* Creates a new instance of ArrayListHandler.
*
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Object[]s.
*/
public ArrayListHandler(RowProcessor convert) {
super();
this.convert = convert;
}