Guest User

Untitled

a guest
Aug 8th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.11 KB | None | 0 0
  1. package com.domain.core;
  2.  
  3. import javax.persistence.Column;
  4. import javax.persistence.Entity;
  5. import javax.persistence.FetchType;
  6. import javax.persistence.GeneratedValue;
  7. import static javax.persistence.GenerationType.IDENTITY;
  8. import javax.persistence.Id;
  9. import javax.persistence.JoinColumn;
  10. import javax.persistence.ManyToOne;
  11. import javax.persistence.Table;
  12.  
  13. @Entity
  14. @Table(name = "CoreNavigationMenu", catalog = "instance_core")
  15. public class CoreNavigationMenu implements java.io.Serializable {
  16.  
  17.     private static final long serialVersionUID = -1221380078004211748L;
  18.     private Integer menuId;
  19.     private CoreNavigation coreNavigation;
  20.     private String stackView;
  21.     private String stackClass;
  22.     private boolean isAdmin;
  23.  
  24.     public CoreNavigationMenu() {
  25.     }
  26.  
  27.     public CoreNavigationMenu(CoreNavigation coreNavigation, String stackView,
  28.             String stackClass, boolean isAdmin) {
  29.         this.coreNavigation = coreNavigation;
  30.         this.stackView = stackView;
  31.         this.stackClass = stackClass;
  32.         this.isAdmin = isAdmin;
  33.     }
  34.  
  35.     @Id
  36.     @GeneratedValue(strategy = IDENTITY)
  37.     @Column(name = "MenuID", unique = true, nullable = false)
  38.     public Integer getMenuId() {
  39.         return this.menuId;
  40.     }
  41.  
  42.     public void setMenuId(Integer menuId) {
  43.         this.menuId = menuId;
  44.     }
  45.  
  46.     @ManyToOne(fetch = FetchType.LAZY)
  47.     @JoinColumn(name = "NavigationID", nullable = false)
  48.     public CoreNavigation getCoreNavigation() {
  49.         return this.coreNavigation;
  50.     }
  51.  
  52.     public void setCoreNavigation(CoreNavigation coreNavigation) {
  53.         this.coreNavigation = coreNavigation;
  54.     }
  55.  
  56.     @Column(name = "StackView", nullable = false, length = 100)
  57.     public String getStackView() {
  58.         return this.stackView;
  59.     }
  60.  
  61.     public void setStackView(String stackView) {
  62.         this.stackView = stackView;
  63.     }
  64.  
  65.     @Column(name = "StackClass", nullable = false)
  66.     public String getStackClass() {
  67.         return this.stackClass;
  68.     }
  69.  
  70.     public void setStackClass(String stackClass) {
  71.         this.stackClass = stackClass;
  72.     }
  73.  
  74.     @Column(name = "IsAdmin", nullable = false)
  75.     public boolean isIsAdmin() {
  76.         return this.isAdmin;
  77.     }
  78.  
  79.     public void setIsAdmin(boolean isAdmin) {
  80.         this.isAdmin = isAdmin;
  81.     }
  82.  
  83. }
Advertisement
Add Comment
Please, Sign In to add comment