SelectItemsToPurchaseRememberSelectionFormImpl.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.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;
import org.apache.myfaces.extensions.validator.baseval.annotation.LongRange;
import org.hibernate.validator.constraints.CreditCardNumber;
import org.hibernate.validator.constraints.Email;
/**
* <p>
* TODO: Model Documentation for my.onlinestore.purchase.remember selection
* </p>
*/
public class SelectItemsToPurchaseRememberSelectionFormImpl
implements Serializable, RememberSelectionForm
{
/**
* Default constructor
*/
public SelectItemsToPurchaseRememberSelectionFormImpl()
{
}
// Action purchase-items-remember-selection formFields
@Email
private String email;
/**
* <p>
* Enter your emails address here.
* </p>
*
* @return email <p>
Enter your emails address here.
</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>
* Enter your emails address here.
* </p>
*
* @param emailIn <p>
Enter your emails address here.
</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;
}
@CreditCardNumber
private String creditCard;
/**
* <p>
* Enter your creditcard here, in case it is valid the purchase will continue and the money will
* be transfered from this account.
* </p>
*
* @return creditCard <p>
Enter your creditcard here, in case it is valid the purchase will continue and the money will be
transfered from this account.
</p>
*/
public String getCreditCard()
{
return this.creditCard;
}
/**
* Keeps track of whether or not the value of creditCard has
* be populated at least once.
*/
private boolean creditCardSet = false;
/**
* Indicates whether or not the value for creditCard has been set at least
* once.
*
* @return true/false
*/
public boolean isCreditCardSet()
{
return this.creditCardSet;
}
/**
* <p>
* Enter your creditcard here, in case it is valid the purchase will continue and the money will
* be transfered from this account.
* </p>
*
* @param creditCardIn <p>
Enter your creditcard here, in case it is valid the purchase will continue and the money will be
transfered from this account.
</p>
*/
public void setCreditCard(String creditCardIn)
{
this.creditCard = StringUtils.trimToNull(creditCardIn);
this.creditCardSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> creditCardBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getCreditCardBackingList()
{
return creditCardBackingList;
}
/**
* @param creditCardBackingListIn
*/
public void setCreditCardBackingList(Collection<SelectItem> creditCardBackingListIn)
{
this.creditCardBackingList = creditCardBackingListIn;
}
@NotNull
@LongRange(minimum=18,maximum=200)
private int age;
/**
* <p>
* Please enter you age here, for legal reasons minors are not allowed to shop in our online
* stores.
* </p>
*
* @return age <p>
Please enter you age here, for legal reasons minors are not allowed to shop in our online stores.
</p>
*/
public int getAge()
{
return this.age;
}
/**
* Keeps track of whether or not the value of age has
* be populated at least once.
*/
private boolean ageSet = false;
/**
* Indicates whether or not the value for age has been set at least
* once.
*
* @return true/false
*/
public boolean isAgeSet()
{
return this.ageSet;
}
/**
* <p>
* Please enter you age here, for legal reasons minors are not allowed to shop in our online
* stores.
* </p>
*
* @param ageIn <p>
Please enter you age here, for legal reasons minors are not allowed to shop in our online stores.
</p>
*/
public void setAge(int ageIn)
{
this.age = ageIn;
this.ageSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> ageBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getAgeBackingList()
{
return ageBackingList;
}
/**
* @param ageBackingListIn
*/
public void setAgeBackingList(Collection<SelectItem> ageBackingListIn)
{
this.ageBackingList = ageBackingListIn;
}
private Date deliveryDate;
/**
* <p>
* This date specifies the date you would like the items delivered.
* </p>
*
* @return deliveryDate <p>
This date specifies the date you would like the items delivered.
</p>
*/
public Date getDeliveryDate()
{
return this.deliveryDate;
}
/**
* Keeps track of whether or not the value of deliveryDate has
* be populated at least once.
*/
private boolean deliveryDateSet = false;
/**
* Indicates whether or not the value for deliveryDate has been set at least
* once.
*
* @return true/false
*/
public boolean isDeliveryDateSet()
{
return this.deliveryDateSet;
}
/**
* <p>
* This date specifies the date you would like the items delivered.
* </p>
*
* @param deliveryDateIn <p>
This date specifies the date you would like the items delivered.
</p>
*/
public void setDeliveryDate(Date deliveryDateIn)
{
this.deliveryDate = deliveryDateIn;
this.deliveryDateSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> deliveryDateBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getDeliveryDateBackingList()
{
return deliveryDateBackingList;
}
/**
* @param deliveryDateBackingListIn
*/
public void setDeliveryDateBackingList(Collection<SelectItem> deliveryDateBackingListIn)
{
this.deliveryDateBackingList = deliveryDateBackingListIn;
}
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;
}
/*
* 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.emailSet)
{
dest.put("email",this.email);
}
if(this.creditCardSet)
{
dest.put("creditCard",this.creditCard);
}
if(this.ageSet)
{
dest.put("age",this.age);
}
if(this.deliveryDateSet)
{
dest.put("deliveryDate",this.deliveryDate);
}
if(this.idSet)
{
dest.put("id",this.id);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public SelectItemsToPurchaseRememberSelectionFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("email"))
{
this.setEmail((String)ConvertUtils.convert(source.get("email"),String.class));
}
if(source.containsKey("creditCard"))
{
this.setCreditCard((String)ConvertUtils.convert(source.get("creditCard"),String.class));
}
if(source.containsKey("age"))
{
this.setAge((Integer)ConvertUtils.convert(source.get("age"),Integer.class));
}
if(source.containsKey("deliveryDate"))
{
this.setDeliveryDate((Date)ConvertUtils.convert(source.get("deliveryDate"),Date.class));
}
if(source.containsKey("id"))
{
this.setId((String)ConvertUtils.convert(source.get("id"),String.class));
}
return this;
}
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = 4787751351507552780L;
}