* @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();