CustomerReservesCarFormImpl.java
// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package org.andromda.samples.carrental.contracts.web.reserveCar;
import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
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.contracts.web.reserveCar.load
* reservations list
* </p>
*/
public class CustomerReservesCarFormImpl
implements Serializable, SearchForReservationsForm
{
/**
* Default constructor
*/
public CustomerReservesCarFormImpl()
{
}
// Action customer-reserves-car-load-reservations-list formFields
private Collection reservations;
/**
* <p>
* TODO: Model Documentation for reservations
* </p>
*
* @return reservations <p>
TODO: Model Documentation for reservations
</p>
*/
public Collection getReservations()
{
return this.reservations;
}
/**
* Keeps track of whether or not the value of reservations has
* be populated at least once.
*/
private boolean reservationsSet = false;
/**
* Indicates whether or not the value for reservations has been set at least
* once.
*
* @return true/false
*/
public boolean isReservationsSet()
{
return this.reservationsSet;
}
/**
* <p>
* TODO: Model Documentation for reservations
* </p>
*
* @param reservationsIn <p>
TODO: Model Documentation for reservations
</p>
*/
public void setReservations(Collection reservationsIn)
{
this.reservations = reservationsIn;
this.reservationsSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> reservationsBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getReservationsBackingList()
{
return reservationsBackingList;
}
/**
* @param reservationsBackingListIn
*/
public void setReservationsBackingList(Collection<SelectItem> reservationsBackingListIn)
{
this.reservationsBackingList = reservationsBackingListIn;
}
private String comfortClass;
/**
* <p>
* Comfort Class of the car
* </p>
*
* @return comfortClass <p>
Comfort Class of the car
</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 of the car
* </p>
*
* @param comfortClassIn <p>
Comfort Class of the car
</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;
}
private Date reservationDate;
/**
* <p>
* Day to pick up the car
* </p>
*
* @return reservationDate <p>
Day to pick up the car
</p>
*/
public Date getReservationDate()
{
return this.reservationDate;
}
/**
* Keeps track of whether or not the value of reservationDate has
* be populated at least once.
*/
private boolean reservationDateSet = false;
/**
* Indicates whether or not the value for reservationDate has been set at least
* once.
*
* @return true/false
*/
public boolean isReservationDateSet()
{
return this.reservationDateSet;
}
/**
* <p>
* Day to pick up the car
* </p>
*
* @param reservationDateIn <p>
Day to pick up the car
</p>
*/
public void setReservationDate(Date reservationDateIn)
{
this.reservationDate = reservationDateIn;
this.reservationDateSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> reservationDateBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getReservationDateBackingList()
{
return reservationDateBackingList;
}
/**
* @param reservationDateBackingListIn
*/
public void setReservationDateBackingList(Collection<SelectItem> reservationDateBackingListIn)
{
this.reservationDateBackingList = reservationDateBackingListIn;
}
private String idReservation;
/**
* <p>
* TODO: Model Documentation for idReservation
* </p>
*
* @return idReservation <p>
TODO: Model Documentation for idReservation
</p>
*/
public String getIdReservation()
{
return this.idReservation;
}
/**
* Keeps track of whether or not the value of idReservation has
* be populated at least once.
*/
private boolean idReservationSet = false;
/**
* Indicates whether or not the value for idReservation has been set at least
* once.
*
* @return true/false
*/
public boolean isIdReservationSet()
{
return this.idReservationSet;
}
/**
* <p>
* TODO: Model Documentation for idReservation
* </p>
*
* @param idReservationIn <p>
TODO: Model Documentation for idReservation
</p>
*/
public void setIdReservation(String idReservationIn)
{
this.idReservation = StringUtils.trimToNull(idReservationIn);
this.idReservationSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> idReservationBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getIdReservationBackingList()
{
return idReservationBackingList;
}
/**
* @param idReservationBackingListIn
*/
public void setIdReservationBackingList(Collection<SelectItem> idReservationBackingListIn)
{
this.idReservationBackingList = idReservationBackingListIn;
}
/*
* 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.reservationsSet)
{
dest.put("reservations",this.reservations);
}
if(this.comfortClassSet)
{
dest.put("comfortClass",this.comfortClass);
}
if(this.reservationDateSet)
{
dest.put("reservationDate",this.reservationDate);
}
if(this.idReservationSet)
{
dest.put("idReservation",this.idReservation);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public CustomerReservesCarFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("reservations"))
{
this.setReservations((Collection)ConvertUtils.convert(source.get("reservations"),Collection.class));
}
if(source.containsKey("comfortClass"))
{
this.setComfortClass((String)ConvertUtils.convert(source.get("comfortClass"),String.class));
}
if(source.containsKey("reservationDate"))
{
this.setReservationDate((Date)ConvertUtils.convert(source.get("reservationDate"),Date.class));
}
if(source.containsKey("idReservation"))
{
this.setIdReservation((String)ConvertUtils.convert(source.get("idReservation"),String.class));
}
return this;
}
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = -6702327805620704821L;
}