AdministratorDetailsUpdateFormImpl.java

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

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>
 * Update the administrator
 * </p>
 */
public class AdministratorDetailsUpdateFormImpl
    implements Serializable, UpdateAdministratorForm
{
    /**
     * Default constructor
     */
    public AdministratorDetailsUpdateFormImpl()
    {
    }

    // Action manage-administrators-update formFields
    private String accountNo;

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

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

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

    /**
     * <p>
     * TODO: Model Documentation for accountNo
     * </p>
     *
     * @param accountNoIn <p>
TODO: Model Documentation for accountNo
</p>
     */
    public void setAccountNo(String accountNoIn)
    {
        this.accountNo = StringUtils.trimToNull(accountNoIn);
        this.accountNoSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getAccountNoBackingList()
    {
        return accountNoBackingList;
    }

    /**
     * @param accountNoBackingListIn
     */
    public void setAccountNoBackingList(Collection<SelectItem> accountNoBackingListIn)
    {
        this.accountNoBackingList = accountNoBackingListIn;
    }
    

    private String name;

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

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

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

    /**
     * <p>
     * TODO: Model Documentation for name
     * </p>
     *
     * @param nameIn <p>
TODO: Model Documentation for name
</p>
     */
    public void setName(String nameIn)
    {
        this.name = StringUtils.trimToNull(nameIn);
        this.nameSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getNameBackingList()
    {
        return nameBackingList;
    }

    /**
     * @param nameBackingListIn
     */
    public void setNameBackingList(Collection<SelectItem> nameBackingListIn)
    {
        this.nameBackingList = nameBackingListIn;
    }
    

    private String email;

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

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

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

    /**
     * <p>
     * TODO: Model Documentation for email
     * </p>
     *
     * @param emailIn <p>
TODO: Model Documentation for email
</p>
     */
    public void setEmail(String emailIn)
    {
        this.email = StringUtils.trimToNull(emailIn);
        this.emailSet = true;
    }

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


    /**
     * @return backingList Collection<SelectItem>
     */
    public Collection<SelectItem> getEmailBackingList()
    {
        return emailBackingList;
    }

    /**
     * @param emailBackingListIn
     */
    public void setEmailBackingList(Collection<SelectItem> emailBackingListIn)
    {
        this.emailBackingList = emailBackingListIn;
    }
    


    /*
     * 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.accountNoSet)
        {
            dest.put("accountNo",this.accountNo);
        }
        if(this.nameSet)
        {
            dest.put("name",this.name);
        }
        if(this.emailSet)
        {
            dest.put("email",this.email);
        }
        return dest;
    }

    /*
     * Fills this form using values of a Map
     *
     * @param source the source Map
     */     
     public AdministratorDetailsUpdateFormImpl copyFrom(Map<String,Object> source)
    {
        if(source.containsKey("accountNo"))
        {
            this.setAccountNo((String)ConvertUtils.convert(source.get("accountNo"),String.class));
        }
        if(source.containsKey("name"))
        {
            this.setName((String)ConvertUtils.convert(source.get("name"),String.class));
        }
        if(source.containsKey("email"))
        {
            this.setEmail((String)ConvertUtils.convert(source.get("email"),String.class));
        }
        return this;
    }

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