Package org.openqreg.bean

Examples of org.openqreg.bean.OrganisationBean


* @return A populated OrganisationBean
*
* @throws SQLException
*/
protected static OrganisationBean populate(ResultSet rs) throws SQLException {
OrganisationBean valueObject = new OrganisationBean();
valueObject.setOrgnr((String)rs.getObject(1));
valueObject.setName((String)rs.getObject(2));
valueObject.setCreatedby((String)rs.getObject(3));
valueObject.setTscreated((java.sql.Timestamp)rs.getObject(4));
valueObject.setUpdatedby((String)rs.getObject(5));
valueObject.setTsupdated((java.sql.Timestamp)rs.getObject(6));
return valueObject;
}
View Full Code Here


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

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.