@Lazy annotation of Service method arguments

218 views
Skip to first unread message

clemieux

unread,
Mar 31, 2014, 10:26:46 PM3/31/14
to gran...@googlegroups.com
Hi,


Automatic build of change sets on the client

Calling the ChangeSetBuilder manually is a bit tedious and ugly, so there is a cleaner possibility when you are using generated typesafe service proxies. You can annotate your service method arguments with @org.granite.tide.data.Lazy :

public void save(@Lazy Person person) {
}
However, when I try to use the @Lazy annotation I get "The annotation @Lazy is disallowed for this location".  Looking at (https://github.com/graniteds/graniteds/blob/master/granite-server-core/src/main/java/org/granite/tide/data/Lazy.java):

**
* @author William DRAI
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Lazy {
}

Shouldn't the second ElementType be ElementType.PARAMETER rather than FIELD?

Thanks,

clemieux





wdrai

unread,
Apr 2, 2014, 5:55:38 AM4/2/14
to gran...@googlegroups.com
Argh, you're right.
It was correct in 2.x and has been broken somehow when moving to 3.0.
Can you please post a JIRA ?

clemieux

unread,
Apr 3, 2014, 4:09:37 PM4/3/14
to gran...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages