Java Code Examples for ims.vo.ValueObjectRef.getDomainId()

The following are Jave code examples for showing how to use getDomainId() of the ims.vo.ValueObjectRef class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInOrganisation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Organisation as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	
	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof OrganisationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 2
Project: AvoinApotti   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Location as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 3
Project: AvoinApotti   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocSite(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from LocSite as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 4
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInOrganisation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Organisation as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	
	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof OrganisationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 5
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Location as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 6
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocSite(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from LocSite as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 7
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInOrganisation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Organisation as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	
	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof OrganisationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 8
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Location as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 9
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocSite(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from LocSite as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 10
Project: openmaxims-linux   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInOrganisation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Organisation as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	
	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof OrganisationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 11
Project: openmaxims-linux   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocation(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from Location as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo  && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}
 
Example 12
Project: openmaxims-linux   File: OrganisationAndLocationImpl.java   Source Code and License Vote up 4 votes
private String checkExchequerCodeIsUniqueInLocSite(String taxonomyCode, ValueObjectRef refVo)
{
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();
	StringBuffer condStr = new StringBuffer();

	DomainFactory factory = getDomainFactory();
	java.util.List list = null;
	String name = "";
	String strHql = "select t1_1.taxonomyCode, l1_1.id, o1_1.name from LocSite as o1_1 left join o1_1.codeMappings as t1_1 left join t1_1.taxonomyName as l1_1 where ";
		
	String andStr = " ";
	

	if (taxonomyCode != null)
	{
		condStr.append(andStr + "(t1_1.taxonomyCode = :code");
		markers.add("code");
		values.add(taxonomyCode);
		andStr = " and ";
		condStr.append(andStr + "l1_1.id = :id");
		markers.add("id");
		values.add(TaxonomyType.EXCH.getId());
		andStr = " and ";
	}
	if (refVo instanceof LocationRefVo && refVo.getDomainId() != null)
	{
		condStr.append(andStr + "o1_1.id != :org");
		markers.add("org");
		values.add(refVo.getDomainId());

	}
	
	condStr.append(")");
	strHql += condStr.toString();

	list = factory.find(strHql, markers, values);

	if(list != null && list.size() > 0)
	{
		Object[] element = (Object[]) list.get(0);
		name = (String)element[2];
		String dupMessage = "Item named '" + name + "' already has a Exchequer mapping with code = " + taxonomyCode;
		return dupMessage;
	}	
	return null;
}