sai-pullabhotla
7/21/2016 - 8:42 PM

Catatumbo - Ignore Annotation

Catatumbo - Ignore Annotation

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

@Entity
public class Person {
    @Identifier(autoGenerated=false)
    private String emailAddress;

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

    private Date dateOfBirth; //This will still be persisted, if there are public accessor methods. 

    @Ignore 
    private int age; //Computed based on the date of birth, so no need to store it in the Datastore. 
    
    //Other members of Person go here. For example, firstName, lastName and 
    //their corresponding accessor and mutator methods. 

}