*/
public static Object findByPrimaryKey(Connection con, PrimaryKey key) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
GrouprelationBean valueObject = null;
GrouprelationKey primaryKey = (GrouprelationKey) key;
try{
pStmt = con.prepareStatement(GrouprelationBeanBase.SELECT_STATEMENT);
pStmt.setObject(1, primaryKey.getUsergroupid());
pStmt.setObject(2, primaryKey.getRelatestoid());
rs = pStmt.executeQuery();
while (rs.next()){
valueObject = populate(rs);
valueObject.afterPopulate(con);
}