HandOutDocContinueFormImpl.java

// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package org.andromda.samples.carrental.contracts.web.handOut;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.Map;
import javax.faces.model.SelectItem;
import javax.validation.constraints.NotNull;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.lang.StringUtils;

/**
 * <p>
 * TODO: Model Documentation for org.andromda.samples.carrental.contracts.web.handOut.continue
 * </p>
 */
public class HandOutDocContinueFormImpl
    implements Serializable
{
    /**
     * Default constructor
     */
    public HandOutDocContinueFormImpl()
    {
    }

    // Action hand-out-car-continue formFields
    @NotNull
    private String contractNo;

    /**
     * <p>
     * TODO: Model Documentation for contractNo
     * </p>
     *
     * @return contractNo <p>
TODO: Model Documentation for contractNo
</p>
     */
    public String getContractNo()
    {
        return this.contractNo;
    }

    /**
     * Keeps track of whether or not the value of contractNo has
     * be populated at least once.
     */
    private boolean contractNoSet = false;

    /**
     * Indicates whether or not the value for contractNo has been set at least
     * once.
     *
     * @return true/false
     */
    public boolean isContractNoSet()
    {
        return this.contractNoSet;
    }

    /**
     * <p>
     * TODO: Model Documentation for contractNo
     * </p>
     *
     * @param contractNoIn <p>
TODO: Model Documentation for contractNo
</p>
     */
    public void setContractNo(String contractNoIn)
    {
        this.contractNo = StringUtils.trimToNull(contractNoIn);
        this.contractNoSet = true;
    }

    /**
     * Stores the label/value pairs.
     */
    private Collection<SelectItem> contractNoBackingList;


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getContractNoBackingList()
    {
        return contractNoBackingList;
    }

    /**
     * @param contractNoBackingListIn
     */
    public void setContractNoBackingList(Collection<SelectItem> contractNoBackingListIn)
    {
        this.contractNoBackingList = contractNoBackingListIn;
    }
    

    @NotNull
    private boolean signed;

    /**
     * <p>
     * TODO: Model Documentation for signed
     * </p>
     *
     * @return signed <p>
TODO: Model Documentation for signed
</p>
     */
    public boolean isSigned()
    {
        return this.signed;
    }
    public boolean getSigned()
    {
        return this.signed;
    }

    /**
     * Keeps track of whether or not the value of signed has
     * be populated at least once.
     */
    private boolean signedSet = false;

    /**
     * Indicates whether or not the value for signed has been set at least
     * once.
     *
     * @return true/false
     */
    public boolean isSignedSet()
    {
        return this.signedSet;
    }

    /**
     * <p>
     * TODO: Model Documentation for signed
     * </p>
     *
     * @param signedIn <p>
TODO: Model Documentation for signed
</p>
     */
    public void setSigned(boolean signedIn)
    {
        this.signed = signedIn;
        this.signedSet = true;
    }

    /**
     * Stores the label/value pairs.
     */
    private Collection<SelectItem> signedBackingList;


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getSignedBackingList()
    {
        return signedBackingList;
    }

    /**
     * @param signedBackingListIn
     */
    public void setSignedBackingList(Collection<SelectItem> signedBackingListIn)
    {
        this.signedBackingList = signedBackingListIn;
    }
    

    private Date handOutDate;

    /**
     * <p>
     * TODO: Model Documentation for handOutDate
     * </p>
     *
     * @return handOutDate <p>
TODO: Model Documentation for handOutDate
</p>
     */
    public Date getHandOutDate()
    {
        return this.handOutDate;
    }

    /**
     * Keeps track of whether or not the value of handOutDate has
     * be populated at least once.
     */
    private boolean handOutDateSet = false;

    /**
     * Indicates whether or not the value for handOutDate has been set at least
     * once.
     *
     * @return true/false
     */
    public boolean isHandOutDateSet()
    {
        return this.handOutDateSet;
    }

    /**
     * <p>
     * TODO: Model Documentation for handOutDate
     * </p>
     *
     * @param handOutDateIn <p>
TODO: Model Documentation for handOutDate
</p>
     */
    public void setHandOutDate(Date handOutDateIn)
    {
        this.handOutDate = handOutDateIn;
        this.handOutDateSet = true;
    }

    /**
     * Stores the label/value pairs.
     */
    private Collection<SelectItem> handOutDateBackingList;


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getHandOutDateBackingList()
    {
        return handOutDateBackingList;
    }

    /**
     * @param handOutDateBackingListIn
     */
    public void setHandOutDateBackingList(Collection<SelectItem> handOutDateBackingListIn)
    {
        this.handOutDateBackingList = handOutDateBackingListIn;
    }
    

    private Date returnDate;

    /**
     * <p>
     * TODO: Model Documentation for returnDate
     * </p>
     *
     * @return returnDate <p>
TODO: Model Documentation for returnDate
</p>
     */
    public Date getReturnDate()
    {
        return this.returnDate;
    }

    /**
     * Keeps track of whether or not the value of returnDate has
     * be populated at least once.
     */
    private boolean returnDateSet = false;

    /**
     * Indicates whether or not the value for returnDate has been set at least
     * once.
     *
     * @return true/false
     */
    public boolean isReturnDateSet()
    {
        return this.returnDateSet;
    }

    /**
     * <p>
     * TODO: Model Documentation for returnDate
     * </p>
     *
     * @param returnDateIn <p>
TODO: Model Documentation for returnDate
</p>
     */
    public void setReturnDate(Date returnDateIn)
    {
        this.returnDate = returnDateIn;
        this.returnDateSet = true;
    }

    /**
     * Stores the label/value pairs.
     */
    private Collection<SelectItem> returnDateBackingList;


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getReturnDateBackingList()
    {
        return returnDateBackingList;
    }

    /**
     * @param returnDateBackingListIn
     */
    public void setReturnDateBackingList(Collection<SelectItem> returnDateBackingListIn)
    {
        this.returnDateBackingList = returnDateBackingListIn;
    }
    


    /*
     * Append this form's fields and values to a Map
     *
     * @param dest the destination Map
     */  
    public Map<String,Object> copyTo(Map<String,Object> dest)
    {
        if(this.contractNoSet)
        {
            dest.put("contractNo",this.contractNo);
        }
        if(this.signedSet)
        {
            dest.put("signed",this.signed);
        }
        if(this.handOutDateSet)
        {
            dest.put("handOutDate",this.handOutDate);
        }
        if(this.returnDateSet)
        {
            dest.put("returnDate",this.returnDate);
        }
        return dest;
    }

    /*
     * Fills this form using values of a Map
     *
     * @param source the source Map
     */     
     public HandOutDocContinueFormImpl copyFrom(Map<String,Object> source)
    {
        if(source.containsKey("contractNo"))
        {
            this.setContractNo((String)ConvertUtils.convert(source.get("contractNo"),String.class));
        }
        if(source.containsKey("signed"))
        {
            this.setSigned((Boolean)ConvertUtils.convert(source.get("signed"),Boolean.class));
        }
        if(source.containsKey("handOutDate"))
        {
            this.setHandOutDate((Date)ConvertUtils.convert(source.get("handOutDate"),Date.class));
        }
        if(source.containsKey("returnDate"))
        {
            this.setReturnDate((Date)ConvertUtils.convert(source.get("returnDate"),Date.class));
        }
        return this;
    }

    /**
     * The serial version UID of this class. Needed for serialization.
     */
    private static final long serialVersionUID = -1102414110458588090L;
}