SelectItemsToPurchaseGoFormImpl.java

// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package my.onlinestore.purchase;

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

/**
 * <p>
 * TODO: Model Documentation for my.onlinestore.purchase.go
 * </p>
 */
public class SelectItemsToPurchaseGoFormImpl
    implements Serializable
{
    /**
     * Default constructor
     */
    public SelectItemsToPurchaseGoFormImpl()
    {
    }

    // Action purchase-items-go formFields
    private String id;

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

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

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

    /**
     * <p>
     * TODO: Model Documentation for id
     * </p>
     *
     * @param idIn <p>
TODO: Model Documentation for id
</p>
     */
    public void setId(String idIn)
    {
        this.id = StringUtils.trimToNull(idIn);
        this.idSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getIdBackingList()
    {
        return idBackingList;
    }

    /**
     * @param idBackingListIn
     */
    public void setIdBackingList(Collection<SelectItem> idBackingListIn)
    {
        this.idBackingList = idBackingListIn;
    }
    

    private String publisher;

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

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

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

    /**
     * <p>
     * TODO: Model Documentation for publisher
     * </p>
     *
     * @param publisherIn <p>
TODO: Model Documentation for publisher
</p>
     */
    public void setPublisher(String publisherIn)
    {
        this.publisher = StringUtils.trimToNull(publisherIn);
        this.publisherSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getPublisherBackingList()
    {
        return publisherBackingList;
    }

    /**
     * @param publisherBackingListIn
     */
    public void setPublisherBackingList(Collection<SelectItem> publisherBackingListIn)
    {
        this.publisherBackingList = publisherBackingListIn;
    }
    


    /*
     * 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.idSet)
        {
            dest.put("id",this.id);
        }
        if(this.publisherSet)
        {
            dest.put("publisher",this.publisher);
        }
        return dest;
    }

    /*
     * Fills this form using values of a Map
     *
     * @param source the source Map
     */     
     public SelectItemsToPurchaseGoFormImpl copyFrom(Map<String,Object> source)
    {
        if(source.containsKey("id"))
        {
            this.setId((String)ConvertUtils.convert(source.get("id"),String.class));
        }
        if(source.containsKey("publisher"))
        {
            this.setPublisher((String)ConvertUtils.convert(source.get("publisher"),String.class));
        }
        return this;
    }

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