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

The following are Jave code examples for showing how to use getAreaOfResidenceIsNotNull() 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 5 votes
/**
 * WDEV-13432
 * Function used to test an address if it is empty.
 * A null address is also considered empty
 */
private boolean isEmptyAddress(PersonAddress previousAddress)
{
	// Test address for null value
	if (previousAddress == null)
		return true;
	
	// Test relevant fields if are not empty
	
	if (previousAddress.getLine1IsNotNull() && previousAddress.getLine1().length() != 0)
		return false;
	
	if (previousAddress.getLine2IsNotNull() && previousAddress.getLine2().length() != 0)
		return false;
	
	if (previousAddress.getLine3IsNotNull() && previousAddress.getLine3().length() != 0)
		return false;
	
	if (previousAddress.getLine4IsNotNull() && previousAddress.getLine4().length() != 0)
		return false;
	
	if (previousAddress.getLine5IsNotNull() && previousAddress.getLine5().length() != 0)
		return false;
	
	if (previousAddress.getPostCodeIsNotNull() && previousAddress.getPostCode().length() != 0)
		return false;
	
	if (previousAddress.getPhoneIsNotNull() && previousAddress.getPhone().length() != 0)
		return false;
	
	if (previousAddress.getCountyIsNotNull())
		return false;
	
	if (previousAddress.getAreaOfResidenceIsNotNull()) //WDEV-19597
		return false;
	
	return true;
}
 
Example 2
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private boolean isAddressDetailsNotNullOrEmpty(PersonAddress address)
{
	if ((address.getLine1IsNotNull() && address.getLine1().length() > 0) ||
		(address.getLine2IsNotNull() && address.getLine2().length() > 0) ||
		(address.getLine3IsNotNull() && address.getLine3().length() > 0) ||
		(address.getLine4IsNotNull() && address.getLine4().length() > 0) ||
		(address.getLine5IsNotNull() && address.getLine5().length() > 0) ||
		(address.getPostCodeIsNotNull() && address.getPostCode().length() > 0) ||
		address.getAreaOfResidenceIsNotNull() ||
		address.getCountyIsNotNull())
			return true;
	return false;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private boolean isAddressDetailsNotNullOrEmpty(PersonAddress address)
{
	if ((address.getLine1IsNotNull() && address.getLine1().length() > 0) ||
		(address.getLine2IsNotNull() && address.getLine2().length() > 0) ||
		(address.getLine3IsNotNull() && address.getLine3().length() > 0) ||
		(address.getLine4IsNotNull() && address.getLine4().length() > 0) ||
		(address.getLine5IsNotNull() && address.getLine5().length() > 0) ||
		(address.getPostCodeIsNotNull() && address.getPostCode().length() > 0) ||
		address.getAreaOfResidenceIsNotNull() ||
		address.getCountyIsNotNull())
			return true;
	return false;
}
 
Example 4
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private boolean isAddressDetailsNotNull(PersonAddress address)
{
	if (address.getLine1IsNotNull() ||
		address.getLine2IsNotNull() ||
		address.getLine3IsNotNull() ||
		address.getLine4IsNotNull() ||
		address.getLine5IsNotNull() ||
		address.getPostCodeIsNotNull() ||
		address.getAreaOfResidenceIsNotNull() || //WDEV-19597
		address.getCountyIsNotNull())
			return true;
	return false;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
/**
 * WDEV-13432
 * Function used to test an address if it is empty.
 * A null address is also considered empty
 */
private boolean isEmptyAddress(PersonAddress previousAddress)
{
	// Test address for null value
	if (previousAddress == null)
		return true;
	
	// Test relevant fields if are not empty
	
	if (previousAddress.getLine1IsNotNull() && previousAddress.getLine1().length() != 0)
		return false;
	
	if (previousAddress.getLine2IsNotNull() && previousAddress.getLine2().length() != 0)
		return false;
	
	if (previousAddress.getLine3IsNotNull() && previousAddress.getLine3().length() != 0)
		return false;
	
	if (previousAddress.getLine4IsNotNull() && previousAddress.getLine4().length() != 0)
		return false;
	
	if (previousAddress.getLine5IsNotNull() && previousAddress.getLine5().length() != 0)
		return false;
	
	if (previousAddress.getPostCodeIsNotNull() && previousAddress.getPostCode().length() != 0)
		return false;
	
	if (previousAddress.getPhoneIsNotNull() && previousAddress.getPhone().length() != 0)
		return false;
	
	if (previousAddress.getCountyIsNotNull())
		return false;
	
	if (previousAddress.getAreaOfResidenceIsNotNull()) //WDEV-19597
		return false;
	
	return true;
}
 
Example 6
Project: openMAXIMS   File: VoMapper.java   View Source Code Vote up 5 votes
protected final void renderAddressVoToXAD(PersonAddress pa, XAD xad,ProviderSystemVo providerSystem) throws Exception
{
	LOG.debug("VoMapper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	if (pa.getCountyIsNotNull())
		xad.getCountyParishCode().setValue(svc.getRemoteLookup(pa.getCounty().getID(), providerSystem.getCodeSystem().getText()));
	
	if(pa.getAddressTypeIsNotNull())
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(pa.getAddressType().getID(), providerSystem.getCodeSystem().getText()));
	}
	else
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(AddressType.PERMANENT.getID(), providerSystem.getCodeSystem().getText()));
	}
	if(pa.getAreaOfResidenceIsNotNull()) //http://jira/browse/WDEV-19177
	{
		xad.getCensusTract().setValue(svc.getRemoteLookup(pa.getAreaOfResidence().getID(), providerSystem.getCodeSystem().getText()));
	}

	LOG.debug("VoMapper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}