Package org.openqreg.bean

Examples of org.openqreg.bean.MessagegrouprelBean


* @return A populated MessagegrouprelBean
*
* @throws SQLException
*/
protected static MessagegrouprelBean populate(ResultSet rs) throws SQLException {
MessagegrouprelBean valueObject = new MessagegrouprelBean();
valueObject.setId((Long)rs.getObject(1));
valueObject.setGroupid((String)rs.getObject(2));
return valueObject;
}
View Full Code Here


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

        .synchronizedList(new ArrayList<MessagegrouprelBean>());

    Map<String, Object> relTree = null;
    relTree = fetch.createRequestTree("MESSAGEGROUPREL_CHECKBOX");
    if (relTree != null && relTree.size() > 0) {
      MessagegrouprelBean grouprelBean = null;
      for (String groupKey : relTree.keySet()) {
        grouprelBean = new MessagegrouprelBean();
        grouprelBean.setId(systemmessageBean.getId());
        grouprelBean.setGroupid(groupKey);
        relCol.add(grouprelBean);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.openqreg.bean.MessagegrouprelBean

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.