Examples of KommunBean


Examples of org.openqreg.bean.KommunBean

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

Examples of org.openqreg.bean.KommunBean

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

* @throws SQLException
*/
public static Object findByPrimaryKey(Connection con, PrimaryKey key) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
KommunBean valueObject = null;
KommunKey primaryKey = (KommunKey) key;
try{
pStmt = con.prepareStatement(KommunBeanBase.SELECT_STATEMENT);
pStmt.setObject(1, primaryKey.getKommunkod());
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
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.