AdministrationFormImpl.java
// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package org.andromda.samples.carrental.admins.web.main;
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.admins.web.main.preload data
* </p>
*/
public class AdministrationFormImpl
implements Serializable, LoadCarAndCarTypesForm
{
/**
* Default constructor
*/
public AdministrationFormImpl()
{
}
// Action administration-preload-data formFields
private Collection cars;
/**
* <p>
* TODO: Model Documentation for cars
* </p>
*
* @return cars <p>
TODO: Model Documentation for cars
</p>
*/
public Collection getCars()
{
return this.cars;
}
/**
* Keeps track of whether or not the value of cars has
* be populated at least once.
*/
private boolean carsSet = false;
/**
* Indicates whether or not the value for cars has been set at least
* once.
*
* @return true/false
*/
public boolean isCarsSet()
{
return this.carsSet;
}
/**
* <p>
* TODO: Model Documentation for cars
* </p>
*
* @param carsIn <p>
TODO: Model Documentation for cars
</p>
*/
public void setCars(Collection carsIn)
{
this.cars = carsIn;
this.carsSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> carsBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getCarsBackingList()
{
return carsBackingList;
}
/**
* @param carsBackingListIn
*/
public void setCarsBackingList(Collection<SelectItem> carsBackingListIn)
{
this.carsBackingList = carsBackingListIn;
}
private Collection carTypes;
/**
* <p>
* TODO: Model Documentation for carTypes
* </p>
*
* @return carTypes <p>
TODO: Model Documentation for carTypes
</p>
*/
public Collection getCarTypes()
{
return this.carTypes;
}
/**
* Keeps track of whether or not the value of carTypes has
* be populated at least once.
*/
private boolean carTypesSet = false;
/**
* Indicates whether or not the value for carTypes has been set at least
* once.
*
* @return true/false
*/
public boolean isCarTypesSet()
{
return this.carTypesSet;
}
/**
* <p>
* TODO: Model Documentation for carTypes
* </p>
*
* @param carTypesIn <p>
TODO: Model Documentation for carTypes
</p>
*/
public void setCarTypes(Collection carTypesIn)
{
this.carTypes = carTypesIn;
this.carTypesSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> carTypesBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getCarTypesBackingList()
{
return carTypesBackingList;
}
/**
* @param carTypesBackingListIn
*/
public void setCarTypesBackingList(Collection<SelectItem> carTypesBackingListIn)
{
this.carTypesBackingList = carTypesBackingListIn;
}
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.carsSet)
{
dest.put("cars",this.cars);
}
if(this.carTypesSet)
{
dest.put("carTypes",this.carTypes);
}
if(this.idSet)
{
dest.put("id",this.id);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public AdministrationFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("cars"))
{
this.setCars((Collection)ConvertUtils.convert(source.get("cars"),Collection.class));
}
if(source.containsKey("carTypes"))
{
this.setCarTypes((Collection)ConvertUtils.convert(source.get("carTypes"),Collection.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 = 1620089366408959118L;
}