This content has been marked as final.
Show 3 replies
-
1. Re: Generating EJB 3 with life-cycle methods using hibernate
maxandersen Nov 4, 2006 5:59 AM (in response to a_titov82)huh!?
-
2. Re: Generating EJB 3 with life-cycle methods using hibernate
a_titov82 Nov 5, 2006 5:42 AM (in response to a_titov82):-(
"Hibernate code generation" can transform MyClass...public class MyClass { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
to this...public class MyClass { private String name; @Column(name = "name", unique = false, nullable = true, insertable = true, updatable = true) public String getName() { return this.name; } public void setName(String name) { this.name = name; } }
That is good.
But can it transform MyClass2...public class MyClass2 { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public void myMethod(){ //do some action... } }
to this...public class MyClass2 { private String name; @Column(name = "name", unique = false, nullable = true, insertable = true, updatable = true) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @PreUpdate public void myMethod(){ //do some action... } }
? -
3. Re: Generating EJB 3 with life-cycle methods using hibernate
maxandersen Nov 5, 2006 10:03 AM (in response to a_titov82)well not really since it does code *generation* not code *transformation*.
but do note you can always use the meta tags or simply customize the templates to makeit do what you want.