SelectContractRegisterFormImpl.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.register
* </p>
*/
public class SelectContractRegisterFormImpl
implements Serializable, RegisterAccidentForm
{
/**
* Default constructor
*/
public SelectContractRegisterFormImpl()
{
}
// Action registering-and-accident-register formFields
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.idContractSet)
{
dest.put("idContract",this.idContract);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public SelectContractRegisterFormImpl copyFrom(Map<String,Object> source)
{
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 = -5019958232160069307L;
}