Package org.openqreg.bean

Examples of org.openqreg.bean.DeletelogBean


* @return A populated DeletelogBean
*
* @throws SQLException
*/
protected static DeletelogBean populate(ResultSet rs) throws SQLException {
DeletelogBean valueObject = new DeletelogBean();
valueObject.setId((Long)rs.getObject(1));
valueObject.setPid((Long)rs.getObject(2));
valueObject.setSsn((String)rs.getObject(3));
valueObject.setUserid((String)rs.getObject(4));
valueObject.setCentreid((String)rs.getObject(5));
valueObject.setContext((String)rs.getObject(6));
valueObject.setStep((String)rs.getObject(7));
valueObject.setDeletetype((String)rs.getObject(8));
valueObject.setTscreated((java.sql.Timestamp)rs.getObject(9));
return valueObject;
}
View Full Code Here


* @throws SQLException
*/
public static Collection<DeletelogBean> findAll(Connection con) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
DeletelogBean valueObject = null;
Collection<DeletelogBean> col = Collections.synchronizedList(new ArrayList<DeletelogBean>());
try{
pStmt = con.prepareStatement(FIND_ALL_STATEMENT);
rs = pStmt.executeQuery();
while (rs.next()){
valueObject = populate(rs);
valueObject.afterPopulate(con);
col.add(valueObject);
}
return col;
}finally{
if(null!=rs){
View Full Code Here

* @throws SQLException
*/
public static Object findByPrimaryKey(Connection con, PrimaryKey key) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
DeletelogBean valueObject = null;
DeletelogKey primaryKey = (DeletelogKey) key;
try{
pStmt = con.prepareStatement(DeletelogBeanBase.SELECT_STATEMENT);
pStmt.setObject(1, primaryKey.getId());
rs = pStmt.executeQuery();
while (rs.next()){
valueObject = populate(rs);
valueObject.afterPopulate(con);
}
return valueObject;
}finally{
if(null!=rs){
rs.close();
View Full Code Here

    }
  }
 
  public static void logToDeleteLog(Connection con, User user, Long pid, String ssn,
    String context, String STEP, String deleteType) throws SQLException {
    DeletelogBean deleteBean = new DeletelogBean();
    deleteBean.setPid(pid);
    deleteBean.setSsn(ssn);
    deleteBean.setUserid(user.getId());
    deleteBean.setCentreid(user.getCentreid());
    deleteBean.setContext(context);
    deleteBean.setStep(STEP);
    deleteBean.setDeletetype(deleteType);
    deleteBean.create(con);
  }
View Full Code Here

TOP

Related Classes of org.openqreg.bean.DeletelogBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.