NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/converter/ToPRSPenaltySearchConverter.java
/**
     * Convert the passed in PRSPenaltySearchRequest to the passed out Penalty search result
     * 
     * @param class PRSPenaltySearchNdsRequest
     * @return
     *         class PRSPenaltySearchRequest
     */
Convert the passed in PRSPenaltySearchRequest to the passed out Penalty search result


Convert the passed in PRSPenaltySearchRequest to the passed out Penalty search result
@Converter
    public static PRSPenaltySearchRequest converting(PRSPenaltySearchNdsRequest prsPenaltySearchNdsRequest) {
        logger.info("Starting Conversion For PRSPenaltySearchNdsRequest");
        /* Class being converted to */
        PRSPenaltySearchRequest prsPenaltySearchRequest = new PRSPenaltySearchRequest();
        prsPenaltySearchRequest.setLanguageCode(prsPenaltySearchNdsRequest.getPenaltySearch().getLanguageCode());
        prsPenaltySearchRequest.setPostcode(
                prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyPostcodesCriteria());
        prsPenaltySearchRequest.setLandlordName(
                prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyLandlordsNameCriteria());
        prsPenaltySearchRequest.setPropertyDetails(
                prsPenaltySearchNdsRequest.getPenaltySearch().getRentalPropertyDetails());
        prsPenaltySearchRequest.setPropertyTown(prsPenaltySearchNdsRequest.getPenaltySearch().getTown());
        if (!StringUtils.equals(prsPenaltySearchNdsRequest.getPenaltySearch().getPropertyType(), "ALL")) {
            prsPenaltySearchRequest.setService(prsPenaltySearchNdsRequest.getPenaltySearch().getPropertyType());
        }
        if ((!StringUtils.equals(prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyType_PRSD(), "ALL"))
                && StringUtils.equals(prsPenaltySearchNdsRequest.getPenaltySearch().getPropertyType(), "PRSD")) {
            prsPenaltySearchRequest.setPenaltyReasonCode(
                    prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyType_PRSD());
        }
        if ((!StringUtils.equals(prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyType_PRSN(), "ALL"))
                && StringUtils.equals(prsPenaltySearchNdsRequest.getPenaltySearch().getPropertyType(), "PRSN")) {
            prsPenaltySearchRequest.setPenaltyReasonCode(
                    prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyType_PRSN());
        }
        if (!StringUtils.isEmpty(prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyRefNo())) {
            prsPenaltySearchRequest.setPenaltyRefNo(
                    new BigInteger(prsPenaltySearchNdsRequest.getPenaltySearch().getPenaltyRefNo()));
        }
        logger.info("Finished Conversion For PRSPenaltySearchNdsRequest");
        return prsPenaltySearchRequest;
    }
@ Converter public static PRSPenaltySearchRequest converting ( PRSPenaltySearchNdsRequest prsPenaltySearchNdsRequest ) { logger . info ( "Starting Conversion For PRSPenaltySearchNdsRequest" ) ; /* Class being converted to */ PRSPenaltySearchRequest prsPenaltySearchRequest = new PRSPenaltySearchRequest ( ) ; prsPenaltySearchRequest . setLanguageCode ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getLanguageCode ( ) ) ; prsPenaltySearchRequest . setPostcode ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyPostcodesCriteria ( ) ) ; prsPenaltySearchRequest . setLandlordName ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyLandlordsNameCriteria ( ) ) ; prsPenaltySearchRequest . setPropertyDetails ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getRentalPropertyDetails ( ) ) ; prsPenaltySearchRequest . setPropertyTown ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getTown ( ) ) ; if ( ! StringUtils . equals ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPropertyType ( ) , "ALL" ) ) { prsPenaltySearchRequest . setService ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPropertyType ( ) ) ; } if ( ( ! StringUtils . equals ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyType_PRSD ( ) , "ALL" ) ) && StringUtils . equals ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPropertyType ( ) , "PRSD" ) ) { prsPenaltySearchRequest . setPenaltyReasonCode ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyType_PRSD ( ) ) ; } if ( ( ! StringUtils . equals ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyType_PRSN ( ) , "ALL" ) ) && StringUtils . equals ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPropertyType ( ) , "PRSN" ) ) { prsPenaltySearchRequest . setPenaltyReasonCode ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyType_PRSN ( ) ) ; } if ( ! StringUtils . isEmpty ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyRefNo ( ) ) ) { prsPenaltySearchRequest . setPenaltyRefNo ( new BigInteger ( prsPenaltySearchNdsRequest . getPenaltySearch ( ) . getPenaltyRefNo ( ) ) ) ; } logger . info ( "Finished Conversion For PRSPenaltySearchNdsRequest" ) ; return prsPenaltySearchRequest ; }
Convert the passed in PRSPenaltySearchRequest to the passed out Penalty search result
Convert the passed in PRSPenaltySearchRequest to the passed out Penalty search result