Java Code Examples for ims.core.vo.OrganisationVo.getRelatedOrganisations()

The following are Jave code examples for showing how to use getRelatedOrganisations() of the ims.core.vo.OrganisationVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private boolean hasActiveChildren(OrganisationVo vo)
{
	if ((vo.getRelatedOrganisations() == null || vo.getRelatedOrganisations().size() == 0) &&
		(vo.getLocationSites() == null || vo.getLocationSites().size() == 0))
		return false;

	for (int i = 0; i < vo.getRelatedOrganisations().size(); i++)
	{
		OrganisationVo orgVo = vo.getRelatedOrganisations().get(i);
		if (orgVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(orgVo))
			return true;			
	}
	for (int i = 0; i < vo.getLocationSites().size(); i++)
	{
		LocMostVo locVo = vo.getLocationSites().get(i);
		if (locVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(locVo))
			return true;			
	}
	return false;
}
 
Example 2
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private boolean hasActiveChildren(OrganisationVo vo)
{
	if ((vo.getRelatedOrganisations() == null || vo.getRelatedOrganisations().size() == 0) &&
		(vo.getLocationSites() == null || vo.getLocationSites().size() == 0))
		return false;

	for (int i = 0; i < vo.getRelatedOrganisations().size(); i++)
	{
		OrganisationVo orgVo = vo.getRelatedOrganisations().get(i);
		if (orgVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(orgVo))
			return true;			
	}
	for (int i = 0; i < vo.getLocationSites().size(); i++)
	{
		LocMostVo locVo = vo.getLocationSites().get(i);
		if (locVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(locVo))
			return true;			
	}
	return false;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private boolean hasActiveChildren(OrganisationVo vo)
{
	if ((vo.getRelatedOrganisations() == null || vo.getRelatedOrganisations().size() == 0) &&
		(vo.getLocationSites() == null || vo.getLocationSites().size() == 0))
		return false;

	for (int i = 0; i < vo.getRelatedOrganisations().size(); i++)
	{
		OrganisationVo orgVo = vo.getRelatedOrganisations().get(i);
		if (orgVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(orgVo))
			return true;			
	}
	for (int i = 0; i < vo.getLocationSites().size(); i++)
	{
		LocMostVo locVo = vo.getLocationSites().get(i);
		if (locVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(locVo))
			return true;			
	}
	return false;
}
 
Example 4
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private boolean hasActiveChildren(OrganisationVo vo)
{
	if ((vo.getRelatedOrganisations() == null || vo.getRelatedOrganisations().size() == 0) &&
		(vo.getLocationSites() == null || vo.getLocationSites().size() == 0))
		return false;

	for (int i = 0; i < vo.getRelatedOrganisations().size(); i++)
	{
		OrganisationVo orgVo = vo.getRelatedOrganisations().get(i);
		if (orgVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(orgVo))
			return true;			
	}
	for (int i = 0; i < vo.getLocationSites().size(); i++)
	{
		LocMostVo locVo = vo.getLocationSites().get(i);
		if (locVo.getIsActive().booleanValue())
			return true;
		if (hasActiveChildren(locVo))
			return true;			
	}
	return false;
}