RegisteringAndAccidentFormImpl.java
// license-header java merge-point
// Generated by andromda-jsf cartridge (forms\FormImpl.java.vsl)
package org.andromda.samples.carrental.contracts.web.registerAccident;
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.registerAccident.search for contract
* </p>
*/
public class RegisteringAndAccidentFormImpl
implements Serializable, SearchForContractsOfCustomerForm
{
/**
* Default constructor
*/
public RegisteringAndAccidentFormImpl()
{
}
// Action registering-and-accident-search-for-contract formFields
private Collection contracts;
/**
* <p>
* TODO: Model Documentation for contracts
* </p>
*
* @return contracts <p>
TODO: Model Documentation for contracts
</p>
*/
public Collection getContracts()
{
return this.contracts;
}
/**
* Keeps track of whether or not the value of contracts has
* be populated at least once.
*/
private boolean contractsSet = false;
/**
* Indicates whether or not the value for contracts has been set at least
* once.
*
* @return true/false
*/
public boolean isContractsSet()
{
return this.contractsSet;
}
/**
* <p>
* TODO: Model Documentation for contracts
* </p>
*
* @param contractsIn <p>
TODO: Model Documentation for contracts
</p>
*/
public void setContracts(Collection contractsIn)
{
this.contracts = contractsIn;
this.contractsSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> contractsBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getContractsBackingList()
{
return contractsBackingList;
}
/**
* @param contractsBackingListIn
*/
public void setContractsBackingList(Collection<SelectItem> contractsBackingListIn)
{
this.contractsBackingList = contractsBackingListIn;
}
private String idContract;
/**
* <p>
* Contract Number
* </p>
*
* @return idContract <p>
Contract Number
</p>
*/
public String getIdContract()
{
return this.idContract;
}
/**
* Keeps track of whether or not the value of idContract has
* be populated at least once.
*/
private boolean idContractSet = false;
/**
* Indicates whether or not the value for idContract has been set at least
* once.
*
* @return true/false
*/
public boolean isIdContractSet()
{
return this.idContractSet;
}
/**
* <p>
* Contract Number
* </p>
*
* @param idContractIn <p>
Contract Number
</p>
*/
public void setIdContract(String idContractIn)
{
this.idContract = StringUtils.trimToNull(idContractIn);
this.idContractSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> idContractBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getIdContractBackingList()
{
return idContractBackingList;
}
/**
* @param idContractBackingListIn
*/
public void setIdContractBackingList(Collection<SelectItem> idContractBackingListIn)
{
this.idContractBackingList = idContractBackingListIn;
}
/*
* 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.contractsSet)
{
dest.put("contracts",this.contracts);
}
if(this.idContractSet)
{
dest.put("idContract",this.idContract);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public RegisteringAndAccidentFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("contracts"))
{
this.setContracts((Collection)ConvertUtils.convert(source.get("contracts"),Collection.class));
}
if(source.containsKey("idContract"))
{
this.setIdContract((String)ConvertUtils.convert(source.get("idContract"),String.class));
}
return this;
}
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = -501110917839587785L;
}