Java 类ims.core.vo.LocSiteVoCollection 实例源码

项目:AvoinApotti    文件:OrgTreeHelper.java   
private void populateLocSites(LocSiteVoCollection locationSites, TreeNode orgNode)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;        

        //WDEV-6444 - if node is inactive disable drag dropping for that node
        if(voLoc.getIsActive().booleanValue() == false)
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName());
        else
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);

        locNode.setCollapsedImage(img);
        locNode.setExpandedImage(img);
        locNode.setCheckBoxVisible(showCheckBoxes);
        populateLocations(voLoc.getLocations().sort(), locNode);
    }       
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
private void checkChildsForDuplicateTaxonoy(LocSiteVoCollection childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
        if (childs == null || doMap==null)
            return;

        for (int i = 0 ; i < childs.size(); i++)
        {
            LocSiteVo locMostVo = childs.get(i);
            Object doObj = doMap.get(locMostVo);
            //If doObj is null it means that nothing has changed in that record and hibernate didn't instantiated that record
            if (doObj instanceof Location)
            {
                //I'm using new Location(((Location) doObj).getId(),((Location) doObj).getVersion()) because LocSite extends Location 
                //and it's possible to have a Location with same mappings and not a LocSite.
                Location loc =(Location) doObj;
                String dupMessage = Keywords.checkDuplicateTaxonomy(factory,new Location(loc.getId(),loc.getVersion()), "codeMappings", locMostVo.getCodeMappings(), "getName");
                if (dupMessage!=null)
                    throw new UniqueKeyViolationException(dupMessage);
            }
        }
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
private void checkChildsForDuplicateTaxonoy(LocSiteVoCollection childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
        if (childs == null || doMap==null)
            return;

        for (int i = 0 ; i < childs.size(); i++)
        {
            LocSiteVo locMostVo = childs.get(i);
            Object doObj = doMap.get(locMostVo);
            //If doObj is null it means that nothing has changed in that record and hibernate didn't instantiated that record
            if (doObj instanceof Location)
            {
                //I'm using new Location(((Location) doObj).getId(),((Location) doObj).getVersion()) because LocSite extends Location 
                //and it's possible to have a Location with same mappings and not a LocSite.
                Location loc =(Location) doObj;
                String dupMessage = Keywords.checkDuplicateTaxonomy(factory,new Location(loc.getId(),loc.getVersion()), "codeMappings", locMostVo.getCodeMappings(), "getName");
                if (dupMessage!=null)
                    throw new UniqueKeyViolationException(dupMessage);
            }
        }
}
项目:openMAXIMS    文件:OrgTreeHelper.java   
private void populateLocSites(LocSiteVoCollection locationSites, TreeNode orgNode)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;        

        //WDEV-6444 - if node is inactive disable drag dropping for that node
        if(voLoc.getIsActive().booleanValue() == false)
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName());
        else
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);

        locNode.setCollapsedImage(img);
        locNode.setExpandedImage(img);
        locNode.setCheckBoxVisible(showCheckBoxes);
        populateLocations(voLoc.getLocations().sort(), locNode);
    }       
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
private void checkChildsForDuplicateTaxonoy(LocSiteVoCollection childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
        if (childs == null || doMap==null)
            return;

        for (int i = 0 ; i < childs.size(); i++)
        {
            LocSiteVo locMostVo = childs.get(i);
            Object doObj = doMap.get(locMostVo);
            //If doObj is null it means that nothing has changed in that record and hibernate didn't instantiated that record
            if (doObj instanceof Location)
            {
                //I'm using new Location(((Location) doObj).getId(),((Location) doObj).getVersion()) because LocSite extends Location 
                //and it's possible to have a Location with same mappings and not a LocSite.
                Location loc =(Location) doObj;
                String dupMessage = Keywords.checkDuplicateTaxonomy(factory,new Location(loc.getId(),loc.getVersion()), "codeMappings", locMostVo.getCodeMappings(), "getName");
                if (dupMessage!=null)
                    throw new UniqueKeyViolationException(dupMessage);
            }
        }
}
项目:openmaxims-linux    文件:OrgTreeHelper.java   
private void populateLocSites(LocSiteVoCollection locationSites, TreeNode orgNode)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;        

        //WDEV-6444 - if node is inactive disable drag dropping for that node
        if(voLoc.getIsActive().booleanValue() == false)
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName());
        else
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);

        locNode.setCollapsedImage(img);
        locNode.setExpandedImage(img);
        locNode.setCheckBoxVisible(showCheckBoxes);
        populateLocations(voLoc.getLocations().sort(), locNode);
    }       
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
private void checkChildsForDuplicateTaxonoy(LocSiteVoCollection childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
        if (childs == null || doMap==null)
            return;

        for (int i = 0 ; i < childs.size(); i++)
        {
            LocSiteVo locMostVo = childs.get(i);
            Object doObj = doMap.get(locMostVo);
            //If doObj is null it means that nothing has changed in that record and hibernate didn't instantiated that record
            if (doObj instanceof Location)
            {
                //I'm using new Location(((Location) doObj).getId(),((Location) doObj).getVersion()) because LocSite extends Location 
                //and it's possible to have a Location with same mappings and not a LocSite.
                Location loc =(Location) doObj;
                String dupMessage = Keywords.checkDuplicateTaxonomy(factory,new Location(loc.getId(),loc.getVersion()), "codeMappings", locMostVo.getCodeMappings(), "getName");
                if (dupMessage!=null)
                    throw new UniqueKeyViolationException(dupMessage);
            }
        }
}
项目:AvoinApotti    文件:M02VoMapper.java   
private void checkModifiedSurgery(LocSiteVoCollection locationSites, LocSiteVo siteVo)
{
    for (int i = 0; i < locationSites.size(); i++)
    {
        LocSiteVo vo =locationSites.get(i); 
        if (vo.equals(siteVo))
        {               
            if (vo.getAddress() == null) vo.setAddress(new PersonAddress());

            if (!siteVo.getAddressIsNotNull() || //msg surgery will be null if all fields cleared with HL7Null ("")
            !adrLinesEqual(vo.getAddress().getLine1(),siteVo.getAddress().getLine1()) ||                        
            !adrLinesEqual(vo.getAddress().getLine2(),siteVo.getAddress().getLine2()) ||
            !adrLinesEqual(vo.getAddress().getLine3(),siteVo.getAddress().getLine3()) || 
            !adrLinesEqual(vo.getAddress().getLine4(),siteVo.getAddress().getLine4()) || 
            !adrLinesEqual(vo.getAddress().getLine5(),siteVo.getAddress().getLine5()) ||
            !adrLinesEqual(vo.getAddress().getPostCode(),siteVo.getAddress().getPostCode()  )
            ||
            vo.getAddress().getCountyIsNotNull() && !vo.getAddress().getCounty().equals(siteVo.getAddress().getCounty())
            )
            {
                vo.setAddress(siteVo.getAddress());
                vo.setName(siteVo.getName());
            }
            setCommsChannels(vo.getCommChannels(),siteVo.getCommChannels());                
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * creates a LocSiteCollection with one LocSiteVo. point is to create a 1 to 1 mapping 
 * of practice - surgery for sites who are not visibly using surgeries. 
 * 
 * @param practice
 * @return practice with 1 surgery, populated from the screen (matches practice values)
 */
private OrganisationVo createOneMatchingChildSurgery(OrganisationVo practice) 
{
    LocSiteVoCollection surgeryCollection = new LocSiteVoCollection();
    LocSiteVo surgery = new LocSiteVo();
    surgery = populateSurgeryData(surgery);
    surgery.setName(surgery.getName() + " surgery");
    surgery.setCodeMappings(null);  // do not want to be creating duplicate location mappings. 
    surgery.setIsVirtual(false);  //wdev-4093 
    surgeryCollection.add(surgery);
    surgeryCollection.get(0).setParentOrganisation(practice);
    practice.setLocationSites(surgeryCollection);

    return practice;
}
项目:openMAXIMS    文件:M02VoMapper.java   
private void checkModifiedSurgery(LocSiteVoCollection locationSites, LocSiteVo siteVo)
{
    for (int i = 0; i < locationSites.size(); i++)
    {
        LocSiteVo vo =locationSites.get(i); 
        if (vo.equals(siteVo))
        {               
            if (vo.getAddress() == null) vo.setAddress(new PersonAddress());

            if (!siteVo.getAddressIsNotNull() || //msg surgery will be null if all fields cleared with HL7Null ("")
            !adrLinesEqual(vo.getAddress().getLine1(),siteVo.getAddress().getLine1()) ||                        
            !adrLinesEqual(vo.getAddress().getLine2(),siteVo.getAddress().getLine2()) ||
            !adrLinesEqual(vo.getAddress().getLine3(),siteVo.getAddress().getLine3()) || 
            !adrLinesEqual(vo.getAddress().getLine4(),siteVo.getAddress().getLine4()) || 
            !adrLinesEqual(vo.getAddress().getLine5(),siteVo.getAddress().getLine5()) ||
            !adrLinesEqual(vo.getAddress().getPostCode(),siteVo.getAddress().getPostCode()  )
            ||
            vo.getAddress().getCountyIsNotNull() && !vo.getAddress().getCounty().equals(siteVo.getAddress().getCounty())
            )
            {
                vo.setAddress(siteVo.getAddress());
                vo.setName(siteVo.getName());
            }
            setCommsChannels(vo.getCommChannels(),siteVo.getCommChannels());                
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * creates a LocSiteCollection with one LocSiteVo. point is to create a 1 to 1 mapping 
 * of practice - surgery for sites who are not visibly using surgeries. 
 * 
 * @param practice
 * @return practice with 1 surgery, populated from the screen (matches practice values)
 */
private OrganisationVo createOneMatchingChildSurgery(OrganisationVo practice) 
{
    LocSiteVoCollection surgeryCollection = new LocSiteVoCollection();
    LocSiteVo surgery = new LocSiteVo();
    surgery = populateSurgeryData(surgery);
    surgery.setName(surgery.getName() + " surgery");
    surgery.setCodeMappings(null);  // do not want to be creating duplicate location mappings. 
    surgery.setIsVirtual(false);  //wdev-4093 
    surgeryCollection.add(surgery);
    surgeryCollection.get(0).setParentOrganisation(practice);
    practice.setLocationSites(surgeryCollection);

    return practice;
}
项目:openMAXIMS    文件:OrgTreeHelper.java   
private void populateLocSites(LocSiteVoCollection locationSites, TreeNode orgNode)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 

        if ((voLoc.getIsActive().booleanValue() == false && !showInactive) || (voLoc.getIsVirtual().booleanValue() && !showVirtual) || ((LocationType.CASE_NOTE_FOLDER_LOCATION.equals(voLoc.getType()) || LocationType.MEDICAL_RECORDS.equals(voLoc.getType()))  && !showCaseNoteLocations && !showLocationsMarkedAsCaseNoteFolderOnly) || (showLocationsMarkedAsCaseNoteFolderOnly && !isCaseFolderLocationOrHasCaseNoteLocChild(voLoc))) //WDEV-19532 //WDEV-19545
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;        

        //WDEV-6444 - if node is inactive disable drag dropping for that node
        if(voLoc.getIsActive().booleanValue() == false)
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName());
        else
            locNode = orgNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);

        locNode.setCollapsedImage(img);
        locNode.setExpandedImage(img);
        locNode.setCheckBoxVisible(showCheckBoxes);
        locNode.setEnabled(showLocationsMarkedAsCaseNoteFolderOnly ? Boolean.TRUE.equals(voLoc.getCaseNoteFolderLocation()) : true); //WDEV-19518
        populateLocations(voLoc.getLocations().sort(), locNode);
    }       
}
项目:openMAXIMS    文件:M02VoMapper.java   
private void checkModifiedSurgery(LocSiteVoCollection locationSites, LocSiteVo siteVo)
{
    for (int i = 0; i < locationSites.size(); i++)
    {
        LocSiteVo vo =locationSites.get(i); 
        if (vo.equals(siteVo))
        {               
            if (vo.getAddress() == null) vo.setAddress(new PersonAddress());

            if (!siteVo.getAddressIsNotNull() || //msg surgery will be null if all fields cleared with HL7Null ("")
            !adrLinesEqual(vo.getAddress().getLine1(),siteVo.getAddress().getLine1()) ||                        
            !adrLinesEqual(vo.getAddress().getLine2(),siteVo.getAddress().getLine2()) ||
            !adrLinesEqual(vo.getAddress().getLine3(),siteVo.getAddress().getLine3()) || 
            !adrLinesEqual(vo.getAddress().getLine4(),siteVo.getAddress().getLine4()) || 
            !adrLinesEqual(vo.getAddress().getLine5(),siteVo.getAddress().getLine5()) ||
            !adrLinesEqual(vo.getAddress().getPostCode(),siteVo.getAddress().getPostCode()  )
            ||
            vo.getAddress().getCountyIsNotNull() && !vo.getAddress().getCounty().equals(siteVo.getAddress().getCounty())
            )
            {
                vo.setAddress(siteVo.getAddress());
                vo.setName(siteVo.getName());
            }
            setCommsChannels(vo.getCommChannels(),siteVo.getCommChannels());                
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * creates a LocSiteCollection with one LocSiteVo. point is to create a 1 to 1 mapping 
 * of practice - surgery for sites who are not visibly using surgeries. 
 * 
 * @param practice
 * @return practice with 1 surgery, populated from the screen (matches practice values)
 */
private OrganisationVo createOneMatchingChildSurgery(OrganisationVo practice) 
{
    LocSiteVoCollection surgeryCollection = new LocSiteVoCollection();
    LocSiteVo surgery = new LocSiteVo();
    surgery = populateSurgeryData(surgery);
    surgery.setName(surgery.getName() + " surgery");
    surgery.setCodeMappings(null);  // do not want to be creating duplicate location mappings. 
    surgery.setIsVirtual(false);  //wdev-4093 
    surgeryCollection.add(surgery);
    surgeryCollection.get(0).setParentOrganisation(practice);
    practice.setLocationSites(surgeryCollection);

    return practice;
}
项目:openmaxims-linux    文件:M02VoMapper.java   
private void checkModifiedSurgery(LocSiteVoCollection locationSites, LocSiteVo siteVo)
{
    for (int i = 0; i < locationSites.size(); i++)
    {
        LocSiteVo vo =locationSites.get(i); 
        if (vo.equals(siteVo))
        {               
            if (vo.getAddress() == null) vo.setAddress(new PersonAddress());

            if (!siteVo.getAddressIsNotNull() || //msg surgery will be null if all fields cleared with HL7Null ("")
            !adrLinesEqual(vo.getAddress().getLine1(),siteVo.getAddress().getLine1()) ||                        
            !adrLinesEqual(vo.getAddress().getLine2(),siteVo.getAddress().getLine2()) ||
            !adrLinesEqual(vo.getAddress().getLine3(),siteVo.getAddress().getLine3()) || 
            !adrLinesEqual(vo.getAddress().getLine4(),siteVo.getAddress().getLine4()) || 
            !adrLinesEqual(vo.getAddress().getLine5(),siteVo.getAddress().getLine5()) ||
            !adrLinesEqual(vo.getAddress().getPostCode(),siteVo.getAddress().getPostCode()  )
            ||
            vo.getAddress().getCountyIsNotNull() && !vo.getAddress().getCounty().equals(siteVo.getAddress().getCounty())
            )
            {
                vo.setAddress(siteVo.getAddress());
                vo.setName(siteVo.getName());
            }
            setCommsChannels(vo.getCommChannels(),siteVo.getCommChannels());                
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * creates a LocSiteCollection with one LocSiteVo. point is to create a 1 to 1 mapping 
 * of practice - surgery for sites who are not visibly using surgeries. 
 * 
 * @param practice
 * @return practice with 1 surgery, populated from the screen (matches practice values)
 */
private OrganisationVo createOneMatchingChildSurgery(OrganisationVo practice) 
{
    LocSiteVoCollection surgeryCollection = new LocSiteVoCollection();
    LocSiteVo surgery = new LocSiteVo();
    surgery = populateSurgeryData(surgery);
    surgery.setName(surgery.getName() + " surgery");
    surgery.setCodeMappings(null);  // do not want to be creating duplicate location mappings. 
    surgery.setIsVirtual(false);  //wdev-4093 
    surgeryCollection.add(surgery);
    surgeryCollection.get(0).setParentOrganisation(practice);
    practice.setLocationSites(surgeryCollection);

    return practice;
}
项目:AvoinApotti    文件:OrganisationLocationHelper.java   
private void populateLocationSites(LocSiteVoCollection locationSites, Object objectTreeOrGrid)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        if (voLoc.getIsVirtualIsNotNull() && voLoc.getIsVirtual().booleanValue())
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;            

        if (this.tree != null)
        {
            TreeNode parentNode = (TreeNode) objectTreeOrGrid;

            locNode = parentNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);
            locNode.setCollapsedImage(img);
            locNode.setExpandedImage(img);
            locNode.setCheckBoxVisible(showCheckBoxes);

            populateLocations(voLoc.getLocations().sort(), locNode);
        }
        else
        {
            DynamicGridRow rowParent = (DynamicGridRow)objectTreeOrGrid;
            DynamicGridRow row = null;
            row = rowParent.getRows().newRow();

            DynamicGridCell cell1 = row.getCells().newCell(getColByIdentifier(COL_DESC), DynamicCellType.LABEL);
            cell1.setValue(voLoc.getNameIsNotNull() ? voLoc.getName() : "");
            cell1.setIdentifier(voLoc.getName());

            row.setValue(voLoc);
            row.setCheckBoxVisible(showCheckBoxes);

            row.setCollapsedImage(img);
            row.setExpandedImage(img);

            populateLocations(voLoc.getLocations().sort(), row);
        }
    }       
}
项目:openMAXIMS    文件:OrganisationLocationHelper.java   
private void populateLocationSites(LocSiteVoCollection locationSites, Object objectTreeOrGrid)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        if (voLoc.getIsVirtualIsNotNull() && voLoc.getIsVirtual().booleanValue())
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;            

        if (this.tree != null)
        {
            TreeNode parentNode = (TreeNode) objectTreeOrGrid;

            locNode = parentNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);
            locNode.setCollapsedImage(img);
            locNode.setExpandedImage(img);
            locNode.setCheckBoxVisible(showCheckBoxes);

            populateLocations(voLoc.getLocations().sort(), locNode);
        }
        else
        {
            DynamicGridRow rowParent = (DynamicGridRow)objectTreeOrGrid;
            DynamicGridRow row = null;
            row = rowParent.getRows().newRow();

            DynamicGridCell cell1 = row.getCells().newCell(getColByIdentifier(COL_DESC), DynamicCellType.LABEL);
            cell1.setValue(voLoc.getNameIsNotNull() ? voLoc.getName() : "");
            cell1.setIdentifier(voLoc.getName());

            row.setValue(voLoc);
            row.setCheckBoxVisible(showCheckBoxes);

            row.setCollapsedImage(img);
            row.setExpandedImage(img);

            populateLocations(voLoc.getLocations().sort(), row);
        }
    }       
}
项目:openMAXIMS    文件:OrganisationLocationHelper.java   
private void populateLocationSites(LocSiteVoCollection locationSites, Object objectTreeOrGrid)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        if (voLoc.getIsVirtualIsNotNull() && voLoc.getIsVirtual().booleanValue())
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;            

        if (this.tree != null)
        {
            TreeNode parentNode = (TreeNode) objectTreeOrGrid;

            locNode = parentNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);
            locNode.setCollapsedImage(img);
            locNode.setExpandedImage(img);
            locNode.setCheckBoxVisible(showCheckBoxes);

            populateLocations(voLoc.getLocations().sort(), locNode);
        }
        else
        {
            DynamicGridRow rowParent = (DynamicGridRow)objectTreeOrGrid;
            DynamicGridRow row = null;
            row = rowParent.getRows().newRow();

            DynamicGridCell cell1 = row.getCells().newCell(getColByIdentifier(COL_DESC), DynamicCellType.LABEL);
            cell1.setValue(voLoc.getNameIsNotNull() ? voLoc.getName() : "");
            cell1.setIdentifier(voLoc.getName());

            row.setValue(voLoc);
            row.setCheckBoxVisible(showCheckBoxes);

            row.setCollapsedImage(img);
            row.setExpandedImage(img);

            populateLocations(voLoc.getLocations().sort(), row);
        }
    }       
}
项目:openmaxims-linux    文件:OrganisationLocationHelper.java   
private void populateLocationSites(LocSiteVoCollection locationSites, Object objectTreeOrGrid)
{
    if (locationSites == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locationSites.size(); i++)
    {
        LocSiteVo voLoc = locationSites.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        if (voLoc.getIsVirtualIsNotNull() && voLoc.getIsVirtual().booleanValue())
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locSiteImg : locSiteDisImg;            

        if (this.tree != null)
        {
            TreeNode parentNode = (TreeNode) objectTreeOrGrid;

            locNode = parentNode.getNodes().add(voLoc, voLoc.getName(), LS_NODE, ORG_NODE, true);
            locNode.setCollapsedImage(img);
            locNode.setExpandedImage(img);
            locNode.setCheckBoxVisible(showCheckBoxes);

            populateLocations(voLoc.getLocations().sort(), locNode);
        }
        else
        {
            DynamicGridRow rowParent = (DynamicGridRow)objectTreeOrGrid;
            DynamicGridRow row = null;
            row = rowParent.getRows().newRow();

            DynamicGridCell cell1 = row.getCells().newCell(getColByIdentifier(COL_DESC), DynamicCellType.LABEL);
            cell1.setValue(voLoc.getNameIsNotNull() ? voLoc.getName() : "");
            cell1.setIdentifier(voLoc.getName());

            row.setValue(voLoc);
            row.setCheckBoxVisible(showCheckBoxes);

            row.setCollapsedImage(img);
            row.setExpandedImage(img);

            populateLocations(voLoc.getLocations().sort(), row);
        }
    }       
}