openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Chauvet (JIRA)" <>
Subject [jira] [Created] (OPENJPA-2274) Annotations & interface methods
Date Fri, 05 Oct 2012 10:12:02 GMT
Guillaume Chauvet created OPENJPA-2274:

             Summary: Annotations & interface methods
                 Key: OPENJPA-2274
             Project: OpenJPA
          Issue Type: Improvement
            Reporter: Guillaume Chauvet

Dear OpenJPA team,

I tested a peculiar use of annotations on methods declared into an interface :

public interface EntityHeader {

    public long getId();

public interface EntityHistorizable<E extends EntityHeader> {

/* .... other methods ....*/

    public void postLoad();
    public void prePersist();


public class Task implements Serializable, EntityHistorizable<Task>, EntityHeader {

/* .... Implementations .... */

    public void postLoad() {

    public void prePersist() {


When I perform a persist/find operation on the "Task" entity, OpenJPA don't execute postLoad/prePersist
methods because annotations are applied in the interface. I don't know if it's a good practice,
but it will be useful in the case who want to provide a "pattern" interface, for example.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message