All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.jmkgreen.morphia.EntityInterceptor Maven / Gradle / Ivy

There is a newer version: 1.2.3
Show newest version
package com.github.jmkgreen.morphia;

import com.github.jmkgreen.morphia.annotations.PostLoad;
import com.github.jmkgreen.morphia.annotations.PostPersist;
import com.github.jmkgreen.morphia.annotations.PreLoad;
import com.github.jmkgreen.morphia.annotations.PrePersist;
import com.github.jmkgreen.morphia.annotations.PreSave;
import com.github.jmkgreen.morphia.mapping.Mapper;
import com.mongodb.DBObject;

/**
 * Interface for intercepting @Entity lifecycle events.
 */
public interface EntityInterceptor {
    /**
     * see {@link PrePersist}
     */
    void prePersist(Object ent, DBObject dbObj, Mapper mapr);

    /**
     * see {@link PreSave}
     */
    void preSave(Object ent, DBObject dbObj, Mapper mapr);

    /**
     * see {@link PostPersist}
     */
    void postPersist(Object ent, DBObject dbObj, Mapper mapr);

    /**
     * see {@link PreLoad}
     */
    void preLoad(Object ent, DBObject dbObj, Mapper mapr);

    /**
     * see {@link PostLoad}
     */
    void postLoad(Object ent, DBObject dbObj, Mapper mapr);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy