Package org.openqreg.bean

Examples of org.openqreg.bean.CountryattributeBean


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


* @throws SQLException
*/
public static Collection<CountryattributeBean> findAll(Connection con) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
CountryattributeBean valueObject = null;
Collection<CountryattributeBean> col = Collections.synchronizedList(new ArrayList<CountryattributeBean>());
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;
CountryattributeBean valueObject = null;
CountryattributeKey primaryKey = (CountryattributeKey) key;
try{
pStmt = con.prepareStatement(CountryattributeBeanBase.SELECT_STATEMENT);
pStmt.setObject(1, primaryKey.getId());
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

TOP

Related Classes of org.openqreg.bean.CountryattributeBean

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.