private void fixGroupRelatiosRecursive(Group parentGroup, PreparedStatement insertGroupRelationStatement, PreparedStatement groupRelationNextVal, boolean sap) throws SQLException { Collection coll = parentGroup.getChildren(); if (coll != null && !coll.isEmpty()) { Iterator iter = coll.iterator(); Group child; while (iter.hasNext()) { child = (Group) iter.next();
private void fixGroupRelatiosRecursive(String groupPK, PreparedStatement selectChildIDFromGroupTree, PreparedStatement insertGroupRelationStatement, PreparedStatement groupRelationNextVal, boolean sap, String indent) throws SQLException {  selectChildIDFromGroupTree.setString(1, groupPK); ResultSet children = selectChildIDFromGroupTree.executeQuery();     String pk;  while (children.next()) { pk = children.getString(1);
	private void fixGroupRelatiosRecursive(Group parentGroup, PreparedStatement insertGroupRelationStatement, PreparedStatement groupRelationNextVal, boolean sap) throws SQLException {		Collection coll = parentGroup.getChildren();		if (coll != null && !coll.isEmpty()) {			Iterator iter = coll.iterator();			Group child;			while (iter.hasNext()) {				child = (Group) iter.next();				if (sap) {					java.sql.ResultSet groupIDrs = groupRelationNextVal.executeQuery();					if (groupIDrs != null && groupIDrs.next()) {						int nextGroupRelationID = groupIDrs.getInt("NEXTID");						insertGroupRelationStatement.setString(3, Integer.toString( nextGroupRelationID));					}					groupIDrs.close();				}				insertGroupRelationStatement.setString(1, parentGroup.getPrimaryKey().toString());				insertGroupRelationStatement.setString(2, child.getPrimaryKey().toString());				insertGroupRelationStatement.execute();								System.out.println("Setting "+parentGroup.getName()+" as PARENT of "+child.getName());				fixGroupRelatiosRecursive(child, insertGroupRelationStatement, groupRelationNextVal, sap);			}		} 	}