/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.firmansyah.gilang.jadwal.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 * @author gilang
 */
@Entity
public class Dosen {

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid2")
    private String id;
    private String nama;
    private String nip;
    private String nipy;
    private String hp;
    private String email;
    private String alamat;

    public String getAlamat() {
        return alamat;
    }

    public void setAlamat(String alamat) {
        this.alamat = alamat;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getHp() {
        return hp;
    }

    public void setHp(String hp) {
        this.hp = hp;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public String getNip() {
        return nip;
    }

    public void setNip(String nip) {
        this.nip = nip;
    }

    public String getNipy() {
        return nipy;
    }

    public void setNipy(String nipy) {
        this.nipy = nipy;
    }
}

@@ -139,16 +139,49 @@
 ntity;%0A%0A
+import javax.persistence.Column;%0A
 import j
@@ -275,16 +275,61 @@
 nce.Id;%0A
+import javax.validation.constraints.NotNull;%0A
 import o
@@ -370,16 +370,69 @@
 nerator;
+%0Aimport org.hibernate.validator.constraints.NotEmpty;
 %0A%0A/**%0A *
@@ -620,126 +620,475 @@
     
-private String nama;%0A    private String nip;%0A    private String nipy;%0A    private String hp;%0A    private String email;
+%0A    @NotNull @NotEmpty%0A    @Column(nullable=false)%0A    private String nama;%0A    %0A    @NotNull @NotEmpty%0A    @Column(nullable=false)%0A    private String nip;%0A    %0A    @NotNull @NotEmpty%0A    @Column(nullable=false)%0A    private String nipy;%0A    %0A    @NotNull @NotEmpty%0A    @Column(nullable=false)%0A    private String hp;%0A    %0A    @NotNull @NotEmpty%0A    @Column(nullable=false, unique=true)%0A    private String email;%0A    %0A    @NotNull @NotEmpty%0A    @Column(nullable=false)
 %0A   

update data dosen