CustomerLoginAuthenticateFormImpl.java
// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package org.andromda.samples.carrental.customers.web.login;
import java.io.Serializable;
import java.util.Collection;
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>
* Click here to authenticate as customer
* </p>
*/
public class CustomerLoginAuthenticateFormImpl
implements Serializable, AuthenticateAsCustomerForm
{
/**
* Default constructor
*/
public CustomerLoginAuthenticateFormImpl()
{
}
// Action customer-log-in-authenticate formFields
@NotNull
private String customerNo;
/**
* <p>
* Customer number
* </p>
*
* @return customerNo <p>
Customer number
</p>
*/
public String getCustomerNo()
{
return this.customerNo;
}
/**
* Keeps track of whether or not the value of customerNo has
* be populated at least once.
*/
private boolean customerNoSet = false;
/**
* Indicates whether or not the value for customerNo has been set at least
* once.
*
* @return true/false
*/
public boolean isCustomerNoSet()
{
return this.customerNoSet;
}
/**
* <p>
* Customer number
* </p>
*
* @param customerNoIn <p>
Customer number
</p>
*/
public void setCustomerNo(String customerNoIn)
{
this.customerNo = StringUtils.trimToNull(customerNoIn);
this.customerNoSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> customerNoBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getCustomerNoBackingList()
{
return customerNoBackingList;
}
/**
* @param customerNoBackingListIn
*/
public void setCustomerNoBackingList(Collection<SelectItem> customerNoBackingListIn)
{
this.customerNoBackingList = customerNoBackingListIn;
}
@NotNull
private String password;
/**
* <p>
* Customer Password
* </p>
*
* @return password <p>
Customer Password
</p>
*/
public String getPassword()
{
return this.password;
}
/**
* Keeps track of whether or not the value of password has
* be populated at least once.
*/
private boolean passwordSet = false;
/**
* Indicates whether or not the value for password has been set at least
* once.
*
* @return true/false
*/
public boolean isPasswordSet()
{
return this.passwordSet;
}
/**
* <p>
* Customer Password
* </p>
*
* @param passwordIn <p>
Customer Password
</p>
*/
public void setPassword(String passwordIn)
{
this.password = StringUtils.trimToNull(passwordIn);
this.passwordSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> passwordBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getPasswordBackingList()
{
return passwordBackingList;
}
/**
* @param passwordBackingListIn
*/
public void setPasswordBackingList(Collection<SelectItem> passwordBackingListIn)
{
this.passwordBackingList = passwordBackingListIn;
}
/*
* 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.customerNoSet)
{
dest.put("customerNo",this.customerNo);
}
if(this.passwordSet)
{
dest.put("password",this.password);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public CustomerLoginAuthenticateFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("customerNo"))
{
this.setCustomerNo((String)ConvertUtils.convert(source.get("customerNo"),String.class));
}
if(source.containsKey("password"))
{
this.setPassword((String)ConvertUtils.convert(source.get("password"),String.class));
}
return this;
}
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = 6146559035614659971L;
}