Examples of VarserviceBean


Examples of org.openqreg.bean.VarserviceBean

* @return A populated VarserviceBean
*
* @throws SQLException
*/
protected static VarserviceBean populate(ResultSet rs) throws SQLException {
VarserviceBean valueObject = new VarserviceBean();
valueObject.setAutoid((Long)rs.getObject(1));
valueObject.setId((String)rs.getObject(2));
valueObject.setService((String)rs.getObject(3));
valueObject.setOrdernumber((Integer)rs.getObject(4));
return valueObject;
}
View Full Code Here

Examples of org.openqreg.bean.VarserviceBean

* @throws SQLException
*/
public static Collection<VarserviceBean> findAll(Connection con) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
VarserviceBean valueObject = null;
Collection<VarserviceBean> col = Collections.synchronizedList(new ArrayList<VarserviceBean>());
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

Examples of org.openqreg.bean.VarserviceBean

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

Examples of org.openqreg.bean.VarserviceBean

    // for (VarserviceBean serviceBean : col) {
    // serviceBean.remove(con);
    // }
    // The attribute must be in the same order because of the schema
    int orderNr = 0;
    VarserviceBean varServiceBean = null;
    for (Node node : serviceList) {
      varServiceBean = new VarserviceBean();
      varServiceBean.setAutoid(autoId);
      varServiceBean.setId(elementId);
      varServiceBean.setService(node.getText().trim());

      varServiceBean.setOrdernumber(new Integer(orderNr));
      varServiceBean.create(con);
      orderNr++;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.