6.20. The AccountingDTOThe AccountingDTO is an object that Hibernate persists to the ACCOUNTING table. The AccountingDTO has four fields: id, carId, price, and a saleDate. The AccountingDTO has getter and setter methods for each data member, along with XDoclet tags telling the <hibernate> XDoclet task how to generate an HBM mapping file that maps between the AccountingDTO object and the ACCOUNTING table. The AccountingDTO looks very similar to the CarDTO from previous chapters, so we're not showing the code here. If you want to see the AccountingDTO code, you can find it in the com.jbossatwork.dto package under the common sub-directory. We've created the AccountingDTO, so now we need to develop the HibernateAccountingDAO to persist the AccountingDTO to the ACCOUNTING table. |