RegisterCarTypeFormImpl.java

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

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 org.andromda.samples.carrental.inventory.web.registerCarType.search
 * car types
 * </p>
 */
public class RegisterCarTypeFormImpl
    implements Serializable, SearchAllCarTypesForm
{
    /**
     * Default constructor
     */
    public RegisterCarTypeFormImpl()
    {
    }

    // Action register-car-type-search-car-types 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 identifier;

    /**
     * <p>
     * Identifier for the comfort Class (Must be unique)
     * </p>
     *
     * @return identifier <p>
Identifier for the comfort Class (Must be unique)
</p>
     */
    public String getIdentifier()
    {
        return this.identifier;
    }

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

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

    /**
     * <p>
     * Identifier for the comfort Class (Must be unique)
     * </p>
     *
     * @param identifierIn <p>
Identifier for the comfort Class (Must be unique)
</p>
     */
    public void setIdentifier(String identifierIn)
    {
        this.identifier = StringUtils.trimToNull(identifierIn);
        this.identifierSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getIdentifierBackingList()
    {
        return identifierBackingList;
    }

    /**
     * @param identifierBackingListIn
     */
    public void setIdentifierBackingList(Collection<SelectItem> identifierBackingListIn)
    {
        this.identifierBackingList = identifierBackingListIn;
    }
    

    private String manufacter;

    /**
     * <p>
     * The manufacter name
     * </p>
     *
     * @return manufacter <p>
The manufacter name
</p>
     */
    public String getManufacter()
    {
        return this.manufacter;
    }

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

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

    /**
     * <p>
     * The manufacter name
     * </p>
     *
     * @param manufacterIn <p>
The manufacter name
</p>
     */
    public void setManufacter(String manufacterIn)
    {
        this.manufacter = StringUtils.trimToNull(manufacterIn);
        this.manufacterSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getManufacterBackingList()
    {
        return manufacterBackingList;
    }

    /**
     * @param manufacterBackingListIn
     */
    public void setManufacterBackingList(Collection<SelectItem> manufacterBackingListIn)
    {
        this.manufacterBackingList = manufacterBackingListIn;
    }
    

    private String orderNo;

    /**
     * <p>
     * Order number
     * </p>
     *
     * @return orderNo <p>
Order number
</p>
     */
    public String getOrderNo()
    {
        return this.orderNo;
    }

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

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

    /**
     * <p>
     * Order number
     * </p>
     *
     * @param orderNoIn <p>
Order number
</p>
     */
    public void setOrderNo(String orderNoIn)
    {
        this.orderNo = StringUtils.trimToNull(orderNoIn);
        this.orderNoSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getOrderNoBackingList()
    {
        return orderNoBackingList;
    }

    /**
     * @param orderNoBackingListIn
     */
    public void setOrderNoBackingList(Collection<SelectItem> orderNoBackingListIn)
    {
        this.orderNoBackingList = orderNoBackingListIn;
    }
    

    private String comfortClass;

    /**
     * <p>
     * Comfort class
     * </p>
     *
     * @return comfortClass <p>
Comfort class
</p>
     */
    public String getComfortClass()
    {
        return this.comfortClass;
    }

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

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

    /**
     * <p>
     * Comfort class
     * </p>
     *
     * @param comfortClassIn <p>
Comfort class
</p>
     */
    public void setComfortClass(String comfortClassIn)
    {
        this.comfortClass = StringUtils.trimToNull(comfortClassIn);
        this.comfortClassSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getComfortClassBackingList()
    {
        return comfortClassBackingList;
    }

    /**
     * @param comfortClassBackingListIn
     */
    public void setComfortClassBackingList(Collection<SelectItem> comfortClassBackingListIn)
    {
        this.comfortClassBackingList = comfortClassBackingListIn;
    }
    


    /*
     * 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.identifierSet)
        {
            dest.put("identifier",this.identifier);
        }
        if(this.manufacterSet)
        {
            dest.put("manufacter",this.manufacter);
        }
        if(this.orderNoSet)
        {
            dest.put("orderNo",this.orderNo);
        }
        if(this.comfortClassSet)
        {
            dest.put("comfortClass",this.comfortClass);
        }
        return dest;
    }

    /*
     * Fills this form using values of a Map
     *
     * @param source the source Map
     */     
     public RegisterCarTypeFormImpl copyFrom(Map<String,Object> source)
    {
        if(source.containsKey("id"))
        {
            this.setId((String)ConvertUtils.convert(source.get("id"),String.class));
        }
        if(source.containsKey("identifier"))
        {
            this.setIdentifier((String)ConvertUtils.convert(source.get("identifier"),String.class));
        }
        if(source.containsKey("manufacter"))
        {
            this.setManufacter((String)ConvertUtils.convert(source.get("manufacter"),String.class));
        }
        if(source.containsKey("orderNo"))
        {
            this.setOrderNo((String)ConvertUtils.convert(source.get("orderNo"),String.class));
        }
        if(source.containsKey("comfortClass"))
        {
            this.setComfortClass((String)ConvertUtils.convert(source.get("comfortClass"),String.class));
        }
        return this;
    }

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