Sounds like a good idea. It adds a lot of freedom and easy customization to be able to override the built in annotations, such as JPA annotations, for special cases.
Please add tasks in Jira. How should it look like in the DSL? In Java, annotations are normally written before the element with @ It is always nice to use similar syntax. We have already used @ to define reference to another domain object in the DSL (to differentiate it from an ordinary java class). Should we rename that to # ? @TransactionAttribute(TransactionAttributeType.NEVER) Service FooService { #Foo foo(String bar); } Entity Foo { @XmlElement String name @Transient - #Country country } It must be possible to define several annotations for an element. One tricky thing is that the DSL elements are not one-to-one to java and it is often ambiguous where to place the annotation in the generated code. Do we need some kind of additional placement hint for the annotation? Do we add to much power to the DSL? Is it possible to solve in some other other way? /Patrik PaloT wrote: > > Hello, > I was thinking/dreaming about one extension to DSL. Should we make new > keyword (e.g. annotate) which will allow as to generate ANY annotation > for objects? Examples: > Entity Test extends BasicTest annotate @Role("ROLE_TEST"), > @StatusField("status, mainStatus") { > Service TestService annotate @Behaviour("InStatusEngine")... > > We should introduce annotate keywork to: > Entity > Property/Attribute > Service > Service methods > Service parameters > BasicValue > > Than we should introduce many concepts with AOP which are easy to > handle and allow endless extensions. > > What do you think about this? > > Pavel > > ------------------------------------------------------------------------------ > _______________________________________________ > Fornax-developer mailing list > Fornax-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fornax-developer > > -- View this message in context: http://www.nabble.com/New-concept-tp24252062s17564p24261598.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer