NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/converter/ToPRSExemptionSearchConverter.java
/**
     * Convert the passed in PRSExemptionSearchRequest to the passed out GetLocalAuthorities
     * 
     * @param class PRSExemptionSearchNdsRequest
     * @return
     *         class PRSExemptionSearchRequest
     */
Convert the passed in PRSExemptionSearchRequest to the passed out GetLocalAuthorities


Convert the passed in PRSExemptionSearchRequest to the passed out GetLocalAuthorities
@Converter
    public static PRSExemptionSearchRequest converting(PRSExemptionSearchNdsRequest prsExemptionSearchNdsRequest) {
        /* Class being converted to */
        PRSExemptionSearchRequest prsExemptionSearchRequest = new PRSExemptionSearchRequest();
        prsExemptionSearchRequest.setLanguageCode(prsExemptionSearchNdsRequest.getExemptionSearch().getLanguageCode());
        prsExemptionSearchRequest.setPostcode(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionPostcodeCriteria());
        prsExemptionSearchRequest.setLandlordName(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionLandlordsNameCriteria());
        prsExemptionSearchRequest.setPropertyDetails(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptPropertyDetails());
        prsExemptionSearchRequest.setPropertyTown(prsExemptionSearchNdsRequest.getExemptionSearch().getTown());
        if (!StringUtils.equals(prsExemptionSearchNdsRequest.getExemptionSearch().getService(), "ALL")) {
            prsExemptionSearchRequest.setService(prsExemptionSearchNdsRequest.getExemptionSearch().getService());
        }
        if ((!StringUtils.equals(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionType_PRSD(), "ALL")) && 
                StringUtils.equals(prsExemptionSearchNdsRequest.getExemptionSearch().getService(), "PRSD")) {
            prsExemptionSearchRequest.setExemptionReasonCode(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionType_PRSD());
        }
        if ((!StringUtils.equals(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionType_PRSN(), "ALL")) && 
                StringUtils.equals(prsExemptionSearchNdsRequest.getExemptionSearch().getService(), "PRSN")) {
            prsExemptionSearchRequest.setExemptionReasonCode(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionType_PRSN());
        }
        if (!StringUtils.isEmpty(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionRefNo()))
        {
            prsExemptionSearchRequest.setExemptionRefNo(
                    new BigInteger(prsExemptionSearchNdsRequest.getExemptionSearch().getExemptionRefNo()));
        }
        prsExemptionSearchRequest.setEPCRequired(prsExemptionSearchNdsRequest.getExemptionSearch().isEpcRequired());
        return prsExemptionSearchRequest;
    }
@ Converter public static PRSExemptionSearchRequest converting ( PRSExemptionSearchNdsRequest prsExemptionSearchNdsRequest ) { /* Class being converted to */ PRSExemptionSearchRequest prsExemptionSearchRequest = new PRSExemptionSearchRequest ( ) ; prsExemptionSearchRequest . setLanguageCode ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getLanguageCode ( ) ) ; prsExemptionSearchRequest . setPostcode ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionPostcodeCriteria ( ) ) ; prsExemptionSearchRequest . setLandlordName ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionLandlordsNameCriteria ( ) ) ; prsExemptionSearchRequest . setPropertyDetails ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptPropertyDetails ( ) ) ; prsExemptionSearchRequest . setPropertyTown ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getTown ( ) ) ; if ( ! StringUtils . equals ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getService ( ) , "ALL" ) ) { prsExemptionSearchRequest . setService ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getService ( ) ) ; } if ( ( ! StringUtils . equals ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionType_PRSD ( ) , "ALL" ) ) && StringUtils . equals ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getService ( ) , "PRSD" ) ) { prsExemptionSearchRequest . setExemptionReasonCode ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionType_PRSD ( ) ) ; } if ( ( ! StringUtils . equals ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionType_PRSN ( ) , "ALL" ) ) && StringUtils . equals ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getService ( ) , "PRSN" ) ) { prsExemptionSearchRequest . setExemptionReasonCode ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionType_PRSN ( ) ) ; } if ( ! StringUtils . isEmpty ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionRefNo ( ) ) ) { prsExemptionSearchRequest . setExemptionRefNo ( new BigInteger ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . getExemptionRefNo ( ) ) ) ; } prsExemptionSearchRequest . setEPCRequired ( prsExemptionSearchNdsRequest . getExemptionSearch ( ) . isEpcRequired ( ) ) ; return prsExemptionSearchRequest ; }
Convert the passed in PRSExemptionSearchRequest to the passed out GetLocalAuthorities
Convert the passed in PRSExemptionSearchRequest to the passed out GetLocalAuthorities
// Assign each child object on its parent