All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.robe.admin.hibernate.entity.Language Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.admin.hibernate.entity;

import io.robe.hibernate.entity.BaseEntity;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

@Entity(name = "Language")
@Table
public class Language extends BaseEntity {

    @NotNull
    @Enumerated(EnumType.STRING)
    @Column(name = "code", nullable = false)
    private Type code;
    @Length(min = 2, max = 30)
    @NotEmpty
    @Column(name = "name", nullable = false,length = 30)
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Type getCode() {
        return code;
    }

    public void setCode(Type lang) {
        this.code = lang;
    }

    public enum Type {
        TR,
        EN;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy