Java Code Examples for ims.core.vo.PersonAddress.getAddressType()

The following are Jave code examples for showing how to use getAddressType() of the ims.core.vo.PersonAddress 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 4 votes
private void initalize() 
{
	//update local context
	if (form.getGlobalContext().Core.getOtherAddressesIsNotNull())
	{
		PersonAddressCollection coll = (ims.core.vo.PersonAddressCollection)form.getGlobalContext().Core.getOtherAddresses().clone();
		PersonAddressCollection collNonHistorical = new PersonAddressCollection();
		for(int i=0; i<coll.size(); i++)
		{
			if(coll.get(i).getAddressType()!=null && !coll.get(i).getAddressType().equals(AddressType.HISTORICAL))
				collNonHistorical.add(coll.get(i));
		}
		form.getLocalContext().setpersonAddressCol(collNonHistorical);
	
	}
	else
		form.getLocalContext().setpersonAddressCol(null);

	if (form.getLocalContext().getpersonAddressColIsNotNull() && form.getLocalContext().getpersonAddressCol().size() > 0)
	{			
		for(PersonAddress pa:form.getLocalContext().getpersonAddressCol())
		{
			if(pa.getAddressType()!=null && !pa.getAddressType().equals(AddressType.HISTORICAL))//WDEV-13009 exclude Historical addresses
			{
				form.recbrAddress().newRow(pa, pa.getLine1IsNotNull()?pa.getLine1():"");
				form.recbrAddress().setValue(pa);
				form.recbrAddress().setEnabled(true);
			}
			else if(pa.getAddressType()==null)
			{
				form.recbrAddress().newRow(pa, pa.getLine1IsNotNull()?pa.getLine1():"");
				form.recbrAddress().setValue(pa);
				form.recbrAddress().setEnabled(true);
			}
		}
	}
	form.cmbAddressType().removeRow(AddressType.NOKHOME);	
	
	form.cmbAddressType().removeRow(AddressType.HISTORICAL);//WDEV-13009 exclude Historical type	
	populateScreenFromData(form.recbrAddress().getValue());

	form.btnClear().setVisible(true);
	form.btnNew().setVisible(true);
	form.btnUpdate().setVisible(true);
	form.btnOK().setVisible(true);
			
	form.setMode(FormMode.VIEW);		
	
}
 
Example 2
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void initalize() 
{
	//update local context
	if (form.getGlobalContext().Core.getOtherAddressesIsNotNull())
	{
		PersonAddressCollection coll = (ims.core.vo.PersonAddressCollection)form.getGlobalContext().Core.getOtherAddresses().clone();
		PersonAddressCollection collNonHistorical = new PersonAddressCollection();
		for(int i=0; i<coll.size(); i++)
		{
			if(coll.get(i).getAddressType()!=null && !coll.get(i).getAddressType().equals(AddressType.HISTORICAL))
				collNonHistorical.add(coll.get(i));
		}
		form.getLocalContext().setpersonAddressCol(collNonHistorical);
	
	}
	else
		form.getLocalContext().setpersonAddressCol(null);

	if (form.getLocalContext().getpersonAddressColIsNotNull() && form.getLocalContext().getpersonAddressCol().size() > 0)
	{			
		for(PersonAddress pa:form.getLocalContext().getpersonAddressCol())
		{
			if(pa.getAddressType()!=null && !pa.getAddressType().equals(AddressType.HISTORICAL))//WDEV-13009 exclude Historical addresses
			{
				form.recbrAddress().newRow(pa, pa.getLine1IsNotNull()?pa.getLine1():"");
				form.recbrAddress().setValue(pa);
				form.recbrAddress().setEnabled(true);
			}
			else if(pa.getAddressType()==null)
			{
				form.recbrAddress().newRow(pa, pa.getLine1IsNotNull()?pa.getLine1():"");
				form.recbrAddress().setValue(pa);
				form.recbrAddress().setEnabled(true);
			}
		}
	}
	form.cmbAddressType().removeRow(AddressType.NOKHOME);	
	
	form.cmbAddressType().removeRow(AddressType.HISTORICAL);//WDEV-13009 exclude Historical type	
	populateScreenFromData(form.recbrAddress().getValue());

	form.btnClear().setVisible(true);
	form.btnNew().setVisible(true);
	form.btnUpdate().setVisible(true);
	form.btnOK().setVisible(true);
			
	form.setMode(FormMode.VIEW);		
	
}
 
Example 3
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 4 votes
private void initalize() 
{
	//update local context
	if (form.getGlobalContext().Core.getOtherAddressesIsNotNull())
	{
		PersonAddressCollection coll = (ims.core.vo.PersonAddressCollection)form.getGlobalContext().Core.getOtherAddresses().clone();
		PersonAddressCollection collNonHistorical = new PersonAddressCollection();
		for(int i=0; i<coll.size(); i++)
		{
			if(coll.get(i).getAddressType()!=null && !coll.get(i).getAddressType().equals(AddressType.HISTORICAL))
				collNonHistorical.add(coll.get(i));
		}
		form.getLocalContext().setpersonAddressCol(collNonHistorical);
	
	}
	else
		form.getLocalContext().setpersonAddressCol(null);

	if (form.getLocalContext().getpersonAddressColIsNotNull() && form.getLocalContext().getpersonAddressCol().size() > 0)
	{			
		for(PersonAddress pa:form.getLocalContext().getpersonAddressCol())
		{
			if(pa.getAddressType()!=null && !pa.getAddressType().equals(AddressType.HISTORICAL))//WDEV-13009 exclude Historical addresses
			{
				form.recbrAddress().newRow(pa, pa.getLine1IsNotNull()?pa.getLine1():"");
				form.recbrAddress().setValue(pa);
				form.recbrAddress().setEnabled(true);
			}
			else if(pa.getAddressType()==null)
			{
				form.recbrAddress().newRow(pa, pa.getLine1IsNotNull()?pa.getLine1():"");
				form.recbrAddress().setValue(pa);
				form.recbrAddress().setEnabled(true);
			}
		}
	}
	form.cmbAddressType().removeRow(AddressType.NOKHOME);	
	
	form.cmbAddressType().removeRow(AddressType.HISTORICAL);//WDEV-13009 exclude Historical type	
	populateScreenFromData(form.recbrAddress().getValue());

	form.btnClear().setVisible(true);
	form.btnNew().setVisible(true);
	form.btnUpdate().setVisible(true);
	form.btnOK().setVisible(true);
			
	form.setMode(FormMode.VIEW);		
	
}