RegisterCarFormImpl.java
// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package org.andromda.samples.carrental.inventory.web.registerCar;
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.inventory.web.registerCar.search
* existing cars
* </p>
*/
public class RegisterCarFormImpl
implements Serializable, SearchAllCarsForm
{
/**
* Default constructor
*/
public RegisterCarFormImpl()
{
}
// Action register-car-search-existing-cars formFields
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;
}
private Collection existingcars;
/**
* <p>
* TODO: Model Documentation for existingcars
* </p>
*
* @return existingcars <p>
TODO: Model Documentation for existingcars
</p>
*/
public Collection getExistingcars()
{
return this.existingcars;
}
/**
* Keeps track of whether or not the value of existingcars has
* be populated at least once.
*/
private boolean existingcarsSet = false;
/**
* Indicates whether or not the value for existingcars has been set at least
* once.
*
* @return true/false
*/
public boolean isExistingcarsSet()
{
return this.existingcarsSet;
}
/**
* <p>
* TODO: Model Documentation for existingcars
* </p>
*
* @param existingcarsIn <p>
TODO: Model Documentation for existingcars
</p>
*/
public void setExistingcars(Collection existingcarsIn)
{
this.existingcars = existingcarsIn;
this.existingcarsSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> existingcarsBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getExistingcarsBackingList()
{
return existingcarsBackingList;
}
/**
* @param existingcarsBackingListIn
*/
public void setExistingcarsBackingList(Collection<SelectItem> existingcarsBackingListIn)
{
this.existingcarsBackingList = existingcarsBackingListIn;
}
private String inventoryNo;
/**
* <p>
* Inventory Number (Must be unique)
* </p>
*
* @return inventoryNo <p>
Inventory Number (Must be unique)
</p>
*/
public String getInventoryNo()
{
return this.inventoryNo;
}
/**
* Keeps track of whether or not the value of inventoryNo has
* be populated at least once.
*/
private boolean inventoryNoSet = false;
/**
* Indicates whether or not the value for inventoryNo has been set at least
* once.
*
* @return true/false
*/
public boolean isInventoryNoSet()
{
return this.inventoryNoSet;
}
/**
* <p>
* Inventory Number (Must be unique)
* </p>
*
* @param inventoryNoIn <p>
Inventory Number (Must be unique)
</p>
*/
public void setInventoryNo(String inventoryNoIn)
{
this.inventoryNo = StringUtils.trimToNull(inventoryNoIn);
this.inventoryNoSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> inventoryNoBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getInventoryNoBackingList()
{
return inventoryNoBackingList;
}
/**
* @param inventoryNoBackingListIn
*/
public void setInventoryNoBackingList(Collection<SelectItem> inventoryNoBackingListIn)
{
this.inventoryNoBackingList = inventoryNoBackingListIn;
}
private String registrationNo;
/**
* <p>
* Registration Number (Must be unique)
* </p>
*
* @return registrationNo <p>
Registration Number (Must be unique)
</p>
*/
public String getRegistrationNo()
{
return this.registrationNo;
}
/**
* Keeps track of whether or not the value of registrationNo has
* be populated at least once.
*/
private boolean registrationNoSet = false;
/**
* Indicates whether or not the value for registrationNo has been set at least
* once.
*
* @return true/false
*/
public boolean isRegistrationNoSet()
{
return this.registrationNoSet;
}
/**
* <p>
* Registration Number (Must be unique)
* </p>
*
* @param registrationNoIn <p>
Registration Number (Must be unique)
</p>
*/
public void setRegistrationNo(String registrationNoIn)
{
this.registrationNo = StringUtils.trimToNull(registrationNoIn);
this.registrationNoSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> registrationNoBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getRegistrationNoBackingList()
{
return registrationNoBackingList;
}
/**
* @param registrationNoBackingListIn
*/
public void setRegistrationNoBackingList(Collection<SelectItem> registrationNoBackingListIn)
{
this.registrationNoBackingList = registrationNoBackingListIn;
}
private String carTypeId;
/**
* <p>
* Select one car type form the list which corresponds with the comfort class
* </p>
*
* @return carTypeId <p>
Select one car type form the list which corresponds with the comfort class
</p>
*/
public String getCarTypeId()
{
return this.carTypeId;
}
/**
* Keeps track of whether or not the value of carTypeId has
* be populated at least once.
*/
private boolean carTypeIdSet = false;
/**
* Indicates whether or not the value for carTypeId has been set at least
* once.
*
* @return true/false
*/
public boolean isCarTypeIdSet()
{
return this.carTypeIdSet;
}
/**
* <p>
* Select one car type form the list which corresponds with the comfort class
* </p>
*
* @param carTypeIdIn <p>
Select one car type form the list which corresponds with the comfort class
</p>
*/
public void setCarTypeId(String carTypeIdIn)
{
this.carTypeId = StringUtils.trimToNull(carTypeIdIn);
this.carTypeIdSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> carTypeIdBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getCarTypeIdBackingList()
{
return carTypeIdBackingList;
}
/**
* @param carTypeIdBackingListIn
*/
public void setCarTypeIdBackingList(Collection<SelectItem> carTypeIdBackingListIn)
{
this.carTypeIdBackingList = carTypeIdBackingListIn;
}
/*
* 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.idSet)
{
dest.put("id",this.id);
}
if(this.existingcarsSet)
{
dest.put("existingcars",this.existingcars);
}
if(this.inventoryNoSet)
{
dest.put("inventoryNo",this.inventoryNo);
}
if(this.registrationNoSet)
{
dest.put("registrationNo",this.registrationNo);
}
if(this.carTypeIdSet)
{
dest.put("carTypeId",this.carTypeId);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public RegisterCarFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("id"))
{
this.setId((String)ConvertUtils.convert(source.get("id"),String.class));
}
if(source.containsKey("existingcars"))
{
this.setExistingcars((Collection)ConvertUtils.convert(source.get("existingcars"),Collection.class));
}
if(source.containsKey("inventoryNo"))
{
this.setInventoryNo((String)ConvertUtils.convert(source.get("inventoryNo"),String.class));
}
if(source.containsKey("registrationNo"))
{
this.setRegistrationNo((String)ConvertUtils.convert(source.get("registrationNo"),String.class));
}
if(source.containsKey("carTypeId"))
{
this.setCarTypeId((String)ConvertUtils.convert(source.get("carTypeId"),String.class));
}
return this;
}
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = 244955422950547329L;
}