Annotation Type PrePersist

  • @Documented
    public @interface PrePersist
    Called before the data has been persisted to the datastore (before mapping is done). Here you can alter your class members prior to being saved.

    Methods with this annotation may optionally take a parameter of type Datastore. This is the Datastore that data will be persisted to.

    Example declarations (in order of most to least typical):

     void cleanUpBeforeSaving() {
       // perform variable sanitization here as needed
     void retrieveOtherInfoBeforeSaving(Datastore datastore) {
       // query datastore as needed
    Scott Hernandez
    See Also:
    PreLoad, PostLoad, PostPersist