Click Finish.
Automaker
@Entity @DAO(daoClass = AutomakerDAO.class) public class Automaker { private int id; public Automaker() { super(); } @Id @GeneratedValue(strategy = GenerationType.AUTO) public int getId() { return id; } public void setId(int id) { this.id = id; } } |
AutomakerDAO
public class AutomakerDAO extends JPADAO<Automaker, Integer> { public AutomakerDAO() { super(Automaker.class); } } |
Attribute - When adding attributes like name, the variable name, the Get method getName, and the Set method setName are generated in the entity class in which the name variable is accessed (getter and setter). The get and set methods are referred to as getters and setters.
private String name; // Returns the attribute public String getName() { return name; } // Sets the attribute public void setName(String attribute) { this.name = attribute; } |