cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Created] (CAY-1872) Easier mapping of default listener methods
Date Thu, 19 Sep 2013 07:36:52 GMT
Andrus Adamchik created CAY-1872:

             Summary: Easier mapping of default listener methods
                 Key: CAY-1872
             Project: Cayenne
          Issue Type: Improvement
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik

IIRC a listener method like this doesn't match anything (the actual annotation can be any
lifecycle annotation.. the important part is absent entity filter) :

public void doSomething(T x) { }

We should actually match that based on the "T" type instead. So if T is an Object or DataObject,
it should match every entity in the model, if T is a specific entity class, it should match
that specific class. So more generally it should match entities that are of type T or any
subtype of T

T can be a class or an interface. I can see how we can make this efficient with T being a
class. With T being an interface other than DataObject or Persistent, we'll need to analyze
all persistent classes in the Model, which can affect performance. I guess we can make a partial
implementation initially supporting T as a class and DataObject / Persistent interfaces, and
then see how bad is a class hierarchy scan with an arbitrary interface. 

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