[jboss-user] [JBoss Eclipse IDE (users)] - Re: Generating EJB 3 with life-cycle methods using hibernate
A_titov82
do-not-reply at jboss.com
Sun Nov 5 05:42:02 EST 2006
:-(
"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...
| }
|
| }
|
?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983288#3983288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983288
More information about the jboss-user
mailing list