/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.objectdb.test.entities; import java.util.List; import javax.jdo.annotations.Index; import javax.jdo.annotations.Unique; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.OneToMany; import javax.persistence.Table; /** * * @author Manoj * @since 26 Sep, 2020 */ @Entity @Table(name = "person") @Index(name = "idx_person_addresses", members = { "Addresses.Street" }) public class Person extends code.entities.AEntity_ad { public static enum Gender { Male, Female, Others; } @Unique(name = "uk_person_name") @Column(name = "Name", nullable = true) private String FullName; @Column(name = "Phone") private String Phone; @OneToMany private List
Addresses; @Basic(optional = false) @Column(name = "Gender", nullable = false) private Gender Gender; public Person() { } public String getFullName() { return FullName; } public void setFullName(String FullName) { this.FullName = FullName; } public String getPhone() { return Phone; } public void setPhone(String Phone) { this.Phone = Phone; } public List getAddresses() { return Addresses; } public void setAddresses(List addres) { this.Addresses = addres; } public Gender getGender() { return Gender; } public void setGender(Gender Gender) { this.Gender = Gender; } }