4
|
1 package de.comline.spring.entity;
|
|
2
|
|
3 import javax.persistence.Column;
|
|
4 import javax.persistence.Entity;
|
|
5 import javax.persistence.GeneratedValue;
|
|
6 import javax.persistence.GenerationType;
|
|
7 import javax.persistence.Id;
|
|
8 import javax.persistence.Table;
|
|
9
|
|
10 @Entity
|
|
11 @Table(name = "MOVIE")
|
|
12 public class Movie {
|
|
13 @Id
|
|
14 @GeneratedValue(strategy = GenerationType.AUTO)
|
|
15 @Column(name = "ID")
|
|
16 private long id;
|
|
17
|
|
18 @Column(name = "TITLE")
|
|
19 private String title;
|
|
20
|
|
21 /**
|
|
22 * This default constructor is required for hibernate but should not be used from client code.
|
|
23 */
|
|
24 @Deprecated
|
|
25 protected Movie() {
|
|
26 super();
|
|
27 }
|
|
28
|
|
29 public Movie(String title) {
|
|
30 this.title = title;
|
|
31 }
|
|
32
|
|
33 public String getTitle() {
|
|
34 return title;
|
|
35 }
|
|
36 }
|