CriteriaSearchConfiguration.java

// license-header java merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by hibernate/HibernateSearchConfiguration.vsl in andromda-spring-cartridge. Do not modify by hand!.
//
package org.andromda.samples.animalquiz;

/**
 * Contains configuration parameters for a <code>CriteriaSearch</code>.
 *
 * @author Stefan Reichert
 * @author Peter Friese
 */
public class CriteriaSearchConfiguration
{
    /**
     * Constructs a new CriteriaSearchConfiguration instance with all fields set to
     * either <code>null</code> or <code>false</code>.
     */
    public CriteriaSearchConfiguration()
    {
        this.forceEagerLoading = false;
        this.firstResult = null;
        this.fetchSize = null;
        this.maximumResultSize = null;
    }

    /**
     * If a parameter refers to a childEntity and <code>forceEagerLoading</code> is
     * <code>true</code>, the childEntity is always loaded. If <code>forceEagerLoading</code> is
     * <code>false</code>, the loading depends on the persister-configuration of the parentEntity.
     */
    private boolean forceEagerLoading;

    /**
     * Returns whether or not eager loading is enabled.
     *
     * @return <code>true</code> if eager loading is enabled, <code>false</code> otherwise
     */
    public boolean isForceEagerLoading()
    {
        return this.forceEagerLoading;
    }

    /**
     * Sets whether or not eager loading is to be enabled.
     *
     * @param forceEagerLoadingIn <code>true</code> if eager loading is to be enabled, <code>false</code> otherwise
     */
    public void setForceEagerLoading(boolean forceEagerLoadingIn)
    {
        this.forceEagerLoading = forceEagerLoadingIn;
    }

    /**
     * The first result to retrieve.
     */
    private Integer firstResult;

    /**
     * Gets the first result to retrieve.
     *
     * @return the first result to retrieve
     */
    public Integer getFirstResult()
    {
        return this.firstResult;
    }

    /**
     * Sets the first result to retrieve.
     *
     * @param firstResultIn the first result to retrieve
     */
    public void setFirstResult(Integer firstResultIn)
    {
        this.firstResult = firstResultIn;
    }

    /**
     * The fetch size.
     */
    private Integer fetchSize;

    /**
     * Gets the fetch size.
     *
     * @return the fetch size
     */
    public Integer getFetchSize()
    {
        return this.fetchSize;
    }

    /**
     * Sets the fetch size.
     *
     * @param fetchSizeIn the fetch size
     */
    public void setFetchSize(Integer fetchSizeIn)
    {
        this.fetchSize = fetchSizeIn;
    }

    /**
     * If <code>maximumResultSize</code> is not <code>null</code> it limits the maximum size of
     * the resultList.
     */
    private Integer maximumResultSize;

    /**
     * Gets the maximum size of the search result.
     *
     * @return the maximum size of the search result.
     */
    public Integer getMaximumResultSize()
    {
        return this.maximumResultSize;
    }

    /**
     * Sets the maximum size of the result.
     *
     * @param maximumResultSizeIn A number indicating how many results will be returned.
     */
    public void setMaximumResultSize(Integer maximumResultSizeIn)
    {
        this.maximumResultSize = maximumResultSizeIn;
    }
}