HandOutCarFormImpl.java
// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package org.andromda.samples.carrental.contracts.web.handOut;
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.contracts.web.handOut.load customer
* reservations
* </p>
*/
public class HandOutCarFormImpl
implements Serializable, SearchForReservationsOfCustomerForm
{
/**
* Default constructor
*/
public HandOutCarFormImpl()
{
}
// Action hand-out-car-load-customer-reservations formFields
private Collection customerReservations;
/**
* <p>
* TODO: Model Documentation for customerReservations
* </p>
*
* @return customerReservations <p>
TODO: Model Documentation for customerReservations
</p>
*/
public Collection getCustomerReservations()
{
return this.customerReservations;
}
/**
* Keeps track of whether or not the value of customerReservations has
* be populated at least once.
*/
private boolean customerReservationsSet = false;
/**
* Indicates whether or not the value for customerReservations has been set at least
* once.
*
* @return true/false
*/
public boolean isCustomerReservationsSet()
{
return this.customerReservationsSet;
}
/**
* <p>
* TODO: Model Documentation for customerReservations
* </p>
*
* @param customerReservationsIn <p>
TODO: Model Documentation for customerReservations
</p>
*/
public void setCustomerReservations(Collection customerReservationsIn)
{
this.customerReservations = customerReservationsIn;
this.customerReservationsSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> customerReservationsBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getCustomerReservationsBackingList()
{
return customerReservationsBackingList;
}
/**
* @param customerReservationsBackingListIn
*/
public void setCustomerReservationsBackingList(Collection<SelectItem> customerReservationsBackingListIn)
{
this.customerReservationsBackingList = customerReservationsBackingListIn;
}
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.customerReservationsSet)
{
dest.put("customerReservations",this.customerReservations);
}
if(this.idReservationSet)
{
dest.put("idReservation",this.idReservation);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public HandOutCarFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("customerReservations"))
{
this.setCustomerReservations((Collection)ConvertUtils.convert(source.get("customerReservations"),Collection.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 = -6992178494809588760L;
}