com.sfs.whichdoctor.beans.SearchHistoryBean.java Source code

Java tutorial

Introduction

Here is the source code for com.sfs.whichdoctor.beans.SearchHistoryBean.java

Source

/*******************************************************************************
 * Copyright (c) 2009 David Harrison.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl-3.0.html
 *
 * Contributors:
 *     David Harrison - initial API and implementation
 ******************************************************************************/
package com.sfs.whichdoctor.beans;

import org.springframework.util.StringUtils;

/**
 * The Class SearchBean.
 *
 * @author David Harrison 18th July 2011
 */
public class SearchHistoryBean implements java.io.Serializable {

    /** The Constant serialVersionUID. */
    private static final long serialVersionUID = 14141414114334L;

    /** The id. */
    private int id;

    /** The person search. */
    private SearchBean personSearch;

    /** The organisation search. */
    private SearchBean organisationSearch;

    /** The debit search. */
    private SearchBean debitSearch;

    /** The credit search. */
    private SearchBean creditSearch;

    /** The receipt search. */
    private SearchBean receiptSearch;

    /** The reimbursement search. */
    private SearchBean reimbursementSearch;

    /** The rotation search. */
    private SearchBean rotationSearch;

    /** The group search. */
    private SearchBean groupSearch;

    /** The isb entity search. */
    private SearchBean isbEntitySearch;

    /** the batch revenue analysis */
    private RevenueAnalysisBean batchRevenueAnalysis;

    /** the stream revenue analysis */
    private RevenueAnalysisBean streamRevenueAnalysis;

    /** The address verification search. */
    private SearchBean addressVerificationSearch;

    /**
     * Sets the id.
     *
     * @param idVal the new id
     */
    public final void setId(final int idVal) {
        this.id = idVal;
    }

    /**
     * Gets the id.
     *
     * @return the id
     */
    public final int getId() {
        return this.id;
    }

    /**
     * Sets the person search.
     *
     * @param search the new person search
     */
    public final void setPersonSearch(final SearchBean search) {
        this.personSearch = search;
    }

    /**
     * Gets the person search.
     *
     * @return the person search
     */
    public final SearchBean getPersonSearch() {
        return this.personSearch;
    }

    /**
     * Sets the organisation search.
     *
     * @param search the new organisation search
     */
    public final void setOrganisationSearch(final SearchBean search) {
        this.organisationSearch = search;
    }

    /**
     * Gets the organisation search.
     *
     * @return the organisation search
     */
    public final SearchBean getOrganisationSearch() {
        return this.organisationSearch;
    }

    /**
     * Sets the debit search.
     *
     * @param search the new debit search
     */
    public final void setDebitSearch(final SearchBean search) {
        this.debitSearch = search;
    }

    /**
     * Gets the debit search.
     *
     * @return the debit search
     */
    public final SearchBean getDebitSearch() {
        return this.debitSearch;
    }

    /**
     * Sets the credit search.
     *
     * @param search the new credit search
     */
    public final void setCreditSearch(final SearchBean search) {
        this.creditSearch = search;
    }

    /**
     * Gets the credit search.
     *
     * @return the credit search
     */
    public final SearchBean getCreditSearch() {
        return this.creditSearch;
    }

    /**
     * Sets the receipt search.
     *
     * @param search the new receipt search
     */
    public final void setReceiptSearch(final SearchBean search) {
        this.receiptSearch = search;
    }

    /**
     * Gets the receipt search.
     *
     * @return the receipt search
     */
    public final SearchBean getReceiptSearch() {
        return this.receiptSearch;
    }

    /**
     * Sets the reimbursement search.
     *
     * @param search the new reimbursement search
     */
    public final void setReimbursementSearch(final SearchBean search) {
        this.reimbursementSearch = search;
    }

    /**
     * Gets the reimbursement search.
     *
     * @return the reimbursement search
     */
    public final SearchBean getReimbursementSearch() {
        return this.reimbursementSearch;
    }

    /**
     * Sets the rotation search.
     *
     * @param search the new rotation search
     */
    public final void setRotationSearch(final SearchBean search) {
        this.rotationSearch = search;
    }

    /**
     * Gets the rotation search.
     *
     * @return the rotation search
     */
    public final SearchBean getRotationSearch() {
        return this.rotationSearch;
    }

    /**
     * Sets the group search.
     *
     * @param search the new group search
     */
    public final void setGroupSearch(final SearchBean search) {
        this.groupSearch = search;
    }

    /**
     * Gets the group search.
     *
     * @return the group search
     */
    public final SearchBean getGroupSearch() {
        return this.groupSearch;
    }

    /**
     * Sets the isb entity search.
     *
     * @param search the new isb entity search
     */
    public final void setIsbEntitySearch(final SearchBean search) {
        this.isbEntitySearch = search;
    }

    /**
     * Gets the isb entity search.
     *
     * @return the isb entity search
     */
    public final SearchBean getIsbEntitySearch() {
        return this.isbEntitySearch;
    }

    /**
     * Sets the batch revenue analysis.
     *
     * @param search the new batch revenue analysis
     */
    public final void setBatchRevenueAnalysis(final RevenueAnalysisBean search) {
        this.batchRevenueAnalysis = search;
    }

    /**
     * Gets the batch revenue analysis.
     *
     * @return the batch revenue analysis
     */
    public final RevenueAnalysisBean getBatchRevenueAnalysis() {
        return this.batchRevenueAnalysis;
    }

    /**
     * Sets the stream revenue analysis.
     *
     * @param search the stream revenue analysis
     */
    public final void setStreamRevenueAnalysis(final RevenueAnalysisBean search) {
        this.streamRevenueAnalysis = search;
    }

    /**
     * Gets the stream revenue analysis.
     *
     * @return the stream revenue analysis
     */
    public final RevenueAnalysisBean getStreamRevenueAnalysis() {
        return this.streamRevenueAnalysis;
    }

    /**
     * Sets the address verification search.
     *
     * @param search the address verification bean
     */
    public final void setAddressVerificationSearch(final SearchBean search) {
        this.addressVerificationSearch = search;
    }

    /**
     * Gets the address verification search.
     *
     * @return the address verification search
     */
    public final SearchBean getAddressVerificationSearch() {
        return this.addressVerificationSearch;
    }

    /**
     * Gets the search for a supplied type.
     *
     * @param type the type
     * @return the search
     */
    public final SearchBean getSearch(final String type) {
        SearchBean search = null;

        if (StringUtils.startsWithIgnoreCase(type, "people")) {
            search = this.getPersonSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "organisation")) {
            search = this.getOrganisationSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "debit")) {
            search = this.getDebitSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "credit")) {
            search = this.getCreditSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "receipt")) {
            search = this.getReceiptSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "reimbursement")) {
            search = this.getReimbursementSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "group")) {
            search = this.getGroupSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "rotation")) {
            search = this.getRotationSearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "isb")) {
            search = this.getIsbEntitySearch();
        }
        if (StringUtils.startsWithIgnoreCase(type, "addressverification")) {
            search = this.getAddressVerificationSearch();
        }

        return search;
    }
}