OrganizationalUnitGrantNode node = new OrganizationalUnitGrantNode();
int hierarchyId = JSONGrantNode.getInt("hierarchyId");
int modelInstanceId = JSONGrantNode.getInt("modelinstance");
String ouPath = JSONGrantNode.getString("ouPath");
ModelInstanceNode modelInstanceNode = DAOFactory.getModelInstanceDAO().loadModelInstanceById(modelInstanceId, null);
OrganizationalUnitNode ouNode = orUnitDao.getOrganizationalUnitNode(ouPath, hierarchyId);
node.setGrant(grant);
node.setModelInstanceNode(modelInstanceNode);
node.setOuNode(ouNode);
List<OrganizationalUnitGrantNode> nodes = new ArrayList<OrganizationalUnitGrantNode>();
HashMap<Integer, Integer> tempGrantNodeIds = new HashMap<Integer, Integer>();
tempGrantNodeIds.put(modelInstanceNode.getModelInstanceNodeId(),ouNode.getNodeId());
if(!utilityGrantNodesCollection.contains(tempGrantNodeIds) ){
Integer modelInstancesToUncheck = JSONGrantNode.optInt("childrenToUncheck");
if(modelInstancesToUncheck!=null){
if(modelInstancesToUncheck.equals(modelInstanceNode.getModelInstanceNodeId())){