ContractFinishReservationFormImpl.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 javax.validation.constraints.NotNull;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.lang.StringUtils;
/**
* <p>
* TODO: Model Documentation for
* org.andromda.samples.carrental.contracts.web.handOut.finishReservation
* </p>
*/
public class ContractFinishReservationFormImpl
implements Serializable
{
/**
* Default constructor
*/
public ContractFinishReservationFormImpl()
{
}
// Action hand-out-car-finish-reservation formFields
@NotNull
private String contractNo;
/**
* <p>
* TODO: Model Documentation for contractNo
* </p>
*
* @return contractNo <p>
TODO: Model Documentation for contractNo
</p>
*/
public String getContractNo()
{
return this.contractNo;
}
/**
* Keeps track of whether or not the value of contractNo has
* be populated at least once.
*/
private boolean contractNoSet = false;
/**
* Indicates whether or not the value for contractNo has been set at least
* once.
*
* @return true/false
*/
public boolean isContractNoSet()
{
return this.contractNoSet;
}
/**
* <p>
* TODO: Model Documentation for contractNo
* </p>
*
* @param contractNoIn <p>
TODO: Model Documentation for contractNo
</p>
*/
public void setContractNo(String contractNoIn)
{
this.contractNo = StringUtils.trimToNull(contractNoIn);
this.contractNoSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> contractNoBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getContractNoBackingList()
{
return contractNoBackingList;
}
/**
* @param contractNoBackingListIn
*/
public void setContractNoBackingList(Collection<SelectItem> contractNoBackingListIn)
{
this.contractNoBackingList = contractNoBackingListIn;
}
@NotNull
private boolean signed;
/**
* <p>
* TODO: Model Documentation for signed
* </p>
*
* @return signed <p>
TODO: Model Documentation for signed
</p>
*/
public boolean isSigned()
{
return this.signed;
}
public boolean getSigned()
{
return this.signed;
}
/**
* Keeps track of whether or not the value of signed has
* be populated at least once.
*/
private boolean signedSet = false;
/**
* Indicates whether or not the value for signed has been set at least
* once.
*
* @return true/false
*/
public boolean isSignedSet()
{
return this.signedSet;
}
/**
* <p>
* TODO: Model Documentation for signed
* </p>
*
* @param signedIn <p>
TODO: Model Documentation for signed
</p>
*/
public void setSigned(boolean signedIn)
{
this.signed = signedIn;
this.signedSet = true;
}
/**
* Stores the label/value pairs.
*/
private Collection<SelectItem> signedBackingList;
/**
* @return backingList Collection<SelectItem>
*/
public Collection<SelectItem> getSignedBackingList()
{
return signedBackingList;
}
/**
* @param signedBackingListIn
*/
public void setSignedBackingList(Collection<SelectItem> signedBackingListIn)
{
this.signedBackingList = signedBackingListIn;
}
/*
* 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.contractNoSet)
{
dest.put("contractNo",this.contractNo);
}
if(this.signedSet)
{
dest.put("signed",this.signed);
}
return dest;
}
/*
* Fills this form using values of a Map
*
* @param source the source Map
*/
public ContractFinishReservationFormImpl copyFrom(Map<String,Object> source)
{
if(source.containsKey("contractNo"))
{
this.setContractNo((String)ConvertUtils.convert(source.get("contractNo"),String.class));
}
if(source.containsKey("signed"))
{
this.setSigned((Boolean)ConvertUtils.convert(source.get("signed"),Boolean.class));
}
return this;
}
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = 5832452960425636848L;
}