Examples of LanBean


Examples of org.openqreg.bean.LanBean

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

Examples of org.openqreg.bean.LanBean

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

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