sai-pullabhotla
8/26/2016 - 1:27 AM

Catatumbo - Embedded Annotation

Catatumbo - Embedded Annotation


import com.jmethods.catatumbo.Embedded;
import com.jmethods.catatumbo.Entity;
import com.jmethods.catatumbo.Identifier;
import com.jmethods.catatumbo.Property;

@Entity(kind = "people")
public class Person {

    @Identifier
    private long id;

    @Property(name = "fname")
    private String firstName;

    @Property(name = "lname")
    private String lastName;

    @Property(indexed = false)
    private int birthYear;

    private boolean citizen;

    @Embedded
    private Address homeAddress;
    
    //Getter and Setter methods for each of the above fields...

}