Package org.openqreg.bean

Examples of org.openqreg.bean.ContainerattributeBean


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


* @throws SQLException
*/
public static Collection<ContainerattributeBean> findAll(Connection con) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
ContainerattributeBean valueObject = null;
Collection<ContainerattributeBean> col = Collections.synchronizedList(new ArrayList<ContainerattributeBean>());
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;
ContainerattributeBean valueObject = null;
ContainerattributeKey primaryKey = (ContainerattributeKey) key;
try{
pStmt = con.prepareStatement(ContainerattributeBeanBase.SELECT_STATEMENT);
pStmt.setObject(1, primaryKey.getAutoid());
pStmt.setObject(2, primaryKey.getAttributename());
rs = pStmt.executeQuery();
while (rs.next()){
valueObject = populate(rs);
valueObject.afterPopulate(con);
}
return valueObject;
}finally{
if(null!=rs){
rs.close();
View Full Code Here

    // for (VarattributeBean vaBean : col) {
    // vaBean.remove(con);
    // }
    // The attribute must be in the same order because of the schema
    int orderNr = 0;
    ContainerattributeBean containerAttrBean = null;
    for (Node node : attrList) {
      attributeName = node.getName().trim();
      attributeValue = node.getText().trim();

      containerAttrBean = new ContainerattributeBean();
      containerAttrBean.setAutoid(autoId);
      containerAttrBean.setId(elementId);
      containerAttrBean.setAttributename(attributeName);

      containerAttrBean.setOrdernumber(new Integer(orderNr));
      containerAttrBean.setAttributevalue(attributeValue);
      containerAttrBean.create(con);
      orderNr++;
    }
  }
View Full Code Here

TOP

Related Classes of org.openqreg.bean.ContainerattributeBean

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.