Java Reference
In-Depth Information
{
this.aircraftModel = aircraftModel;
}
public String getAircraftSerial()
{
return aircraftSerial;
}
public void setAircraftSerial(String aircraftSerial)
{
this.aircraftSerial = aircraftSerial;
}
public String getEngineModel()
{
return engineModel;
}
public void setEngineModel(String engineModel)
{
this.engineModel = engineModel;
}
public String getTailNum()
{
return tailNum;
}
public void setTailNum(String tailNum)
{
this.tailNum = tailNum;
}
}
This type of object is called a Data Object , a Data Transfer Object (DTO), or a Value
Object (VO) . Since one of the requirements of the JavaBeans specification is to have
a no-argument constructor, we included one in our bean. We also included another
convenient constructor that initializes all the properties in it. It is always a good idea
to follow standard naming conventions, a practice we followed in the preceding
code. Since this object's properties don't match the report template's field names, we
need to modify the report template. The modified JRXML template looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
 
Search WWH ::




Custom Search