package io.trygvis.container.myapp; import javax.persistence.Entity; import javax.persistence.SequenceGenerator; @Entity @SequenceGenerator(name = "id_seq") public class Contact extends AbstractEntity { public final String name; public enum Gender { MALE, FEMALE } public final Gender gender; public final Company company; public Contact(String name, Gender gender, Company company) { this.name = name; this.gender = gender; this.company = company; } }