Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Item {
- private IntegerProperty item_id;
- private StringProperty name;
- private DoubleProperty bail;
- private DoubleProperty rentalprice;
- private IntegerProperty count;
- public Item(int item_id, String name, double bail, double rentalprice, int count) {
- this.item_id = new SimpleIntegerProperty(item_id);
- this.name = new SimpleStringProperty(name);
- this.bail = new SimpleDoubleProperty(bail);
- this.rentalprice = new SimpleDoubleProperty(rentalprice);
- this.count = new SimpleIntegerProperty(count);
- }
- public int getItem_id() {
- return item_id.get();
- }
- public IntegerProperty item_idProperty() {
- return item_id;
- }
- public void setItem_id(int item_id) {
- this.item_id.set(item_id);
- }
- public String getName() {
- return name.get();
- }
- public StringProperty nameProperty() {
- return name;
- }
- public void setName(String name) {
- this.name.set(name);
- }
- public double getBail() {
- return bail.get();
- }
- public DoubleProperty bailProperty() {
- return bail;
- }
- public void setBail(double bail) {
- this.bail.set(bail);
- }
- public double getRentalprice() {
- return rentalprice.get();
- }
- public DoubleProperty rentalpriceProperty() {
- return rentalprice;
- }
- public void setRentalprice(double rentalprice) {
- this.rentalprice.set(rentalprice);
- }
- public int getCount() {
- return count.get();
- }
- public IntegerProperty countProperty() {
- return count;
- }
- public void setCount(int count) {
- this.count.set(count);
- }
- @Entity
- @Table(name = "item", schema = "appdb")
- public class ItemEntity {
- private int item_id;
- private String name;
- private double bail;
- private double rentalprice;
- private int count;
- private List<ClientEntity> clientList;
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "item_id", nullable = false)
- public int getItem_id() {
- return item_id;
- }
- public void setItem_id(int item_id) {
- this.item_id = item_id;
- }
- @Basic
- @Column(name = "name", nullable = false)
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- @Basic
- @Column(name = "bail", nullable = false)
- public double getBail() {
- return bail;
- }
- public void setBail(double bail) {
- this.bail = bail;
- }
- @Basic
- @Column(name = "rentalprice", nullable = false)
- public double getRentalprice() {
- return rentalprice;
- }
- public void setRentalprice(double rentalprice) {
- this.rentalprice = rentalprice;
- }
- @Basic
- @Column(name = "count", nullable = false)
- public int getCount() {
- return count;
- }
- public void setCount(int count) {
- this.count = count;
- }
- @ManyToMany(mappedBy = "itemList")
- public List<ClientEntity> getClientList() {
- return clientList;
- }
- public void setClientList(List<ClientEntity> clientList) {
- this.clientList = clientList;
- }
Add Comment
Please, Sign In to add comment