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

The following are Jave code examples for showing how to use getAddressLocality() 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: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
/**
 * WDEV-13556
 * Function used to build address to display for HEARTS patients
 */
private StringBuffer getHeartsPatientAddress(PersonAddress patAddr)
{
	StringBuffer address = new StringBuffer();
	
	if (patAddr.getAddressBuildingName() != null && patAddr.getAddressBuildingName().length() != 0)
	{
		address.append(patAddr.getAddressBuildingName());
	}
	
	if (patAddr.getAddressBuildingNumber() != null && patAddr.getAddressBuildingNumber().length() != 0)
	{
		if (!address.toString().equals(""))
			address.append(newLine);
		
		address.append(patAddr.getAddressBuildingNumber());
	}
	
	if (patAddr.getAddressLocality() != null && patAddr.getAddressLocality().length() != 0)
	{
		if (!address.toString().equals(""))
			address.append(newLine);

		address.append(patAddr.getAddressLocality());
	}
	
	if (patAddr.getAddressPostTown() != null && patAddr.getAddressPostTown().length() != 0)
	{
		if (!address.toString().equals(""))
			address.append(newLine);

		address.append(patAddr.getAddressPostTown());
	}
	
	if (patAddr.getAddressPostCode() != null && patAddr.getAddressPostCode().length() != 0)
	{
		if (!address.toString().equals(""))
			address.append(newLine);
		address.append(patAddr.getAddressPostCode());
	}
	
	return address;
}