com.github.luohaha.LuoORM.DBExecuter.DBExecuter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of LuoORM Show documentation
Show all versions of LuoORM Show documentation
yet another ORM framework.
package com.github.luohaha.LuoORM.DBExecuter;
import java.sql.SQLException;
import java.util.List;
import com.github.luohaha.LuoORM.ExecuteSQL;
import com.github.luohaha.LuoORM.DBPool.DBPool;
import com.github.luohaha.LuoORM.Table.Processor;
public class DBExecuter {
private DBPool s;
public DBExecuter(DBPool pool) {
this.s = pool;
}
public void closePool() throws SQLException {
this.s.closePool();
}
public static DBExecuter use(DBPool pool) {
return new DBExecuter(pool);
}
public DBExecuter execute(String sql) {
// TODO Auto-generated method stub
ExecuteSQL.executeSingelSQL(s, sql);
return this;
}
public DBExecuter executeBatch(List sqls) {
// TODO Auto-generated method stub
ExecuteSQL.executeSQLBatch(s, sqls);
return this;
}
public Object executeAndReturn(String sql, Class c) {
return Processor.RowSetToObject(ExecuteSQL.executeSQLAndReturn(s, sql), c);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy