Meta
Tag Cloud
Category Archives: Hibernate
A TableModel for Entity Beans
For my graduation project i needed a component that could display a list of Entity Beans. I found that JTable is such a component and with the help of custom TableCellRenderer and TableCellEditor components i was able to customize the … Continue reading
Posted in Hibernate
Leave a comment
Couple of screenshots of my graduation project
Here are a couple of screenshots of my graduation project i’ve been working on last couple of weeks. The GUI is built with Swing, the bussiness rules make extensive use of the Apache BeanUtils and Hibernate Validators packages and with … Continue reading
ManyToMany relationships with Java Persistence (JSR-220)
The scenario is as following: each table can have many reservations, and each reservation can span many tables. Here is our first trial: // Table.java @ManyToMany( targetEntity=Reservation.class ) public List getReservations() {..} // Reservation.java @ManyToMany( targetEntity=Table.class ) public List getTables() … Continue reading
Posted in Hibernate
Comments Off
OneToMany relationships with Java Persistence (JSR 220)
Let’s experiment a bit with Hibernate. We want to model the tables employee and shift. Each employee has multiple shifts (and each shift belongs to an employee). We want an employee table and a shift table (which has the employee_id … Continue reading