1 package demo.drupal.persistence; 2 3 import javax.persistence.Column; 4 import javax.persistence.Entity; 5 import javax.persistence.Id; 6 import javax.persistence.JoinColumn; 7 import javax.persistence.ManyToOne; 8 import javax.persistence.Table; 9 import java.sql.Date ; 10 11 @Entity 12 @Table(name="node") 13 public class Node { 14 41 42 @Id 43 @Column(name="nid") 44 private int id; 45 46 private String type; 47 private String title; 48 private int status; 49 private Date created; 50 private Date changed; 51 private int comment; 52 private int promote; 53 private int moderate; 54 private int sticky; 55 56 @ManyToOne 57 @JoinColumn(name="uid") 58 private User user; 59 60 @ManyToOne 61 @JoinColumn(name="vid") 62 private Vocabulary vocabulary; 63 64 public int getId() 65 { 66 return id; 67 } 68 69 public Date getChanged() 70 { 71 return changed; 72 } 73 74 public int getComment() 75 { 76 return comment; 77 } 78 79 public Date getCreated() 80 { 81 return created; 82 } 83 84 public int getModerate() 85 { 86 return moderate; 87 } 88 89 public int getPromote() 90 { 91 return promote; 92 } 93 94 public int getStatus() 95 { 96 return status; 97 } 98 99 public int getSticky() 100 { 101 return sticky; 102 } 103 104 public String getTitle() 105 { 106 return title; 107 } 108 109 public String getType() 110 { 111 return type; 112 } 113 114 public User getUser() 115 { 116 return user; 117 } 118 119 public Vocabulary getVocabulary() 120 { 121 return vocabulary; 122 } 123 } 124 | Popular Tags |