-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: get annotations properties
PostPosted: Fri Feb 09, 2007 6:26 am 
Regular
Regular

Joined: Sat May 20, 2006 3:49 am
Posts: 78
Hello!

I would like to get the information of the column annotations:

Code:
@Column(name = "TXT_LAST_NAME", unique = false, nullable = false, insertable = true, updatable = true, length = 1000)
public String getTxtLastName() {
        return this.txtLastName;
    }


For example the unique property and the length property. I know that it is possible with java reflection, but it's not very save because I have to use the method's name.

Any ideas?

Greets from austria.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 09, 2007 9:57 am 
Regular
Regular

Joined: Sat May 20, 2006 3:49 am
Posts: 78
so far I can't see any advantages of using annotations for validation, because the annotations are not accessible in an easy/comfortable way. I would have a benefit with validation annotations, if I can reuse them in other application tiers, for example in the gui to show a not-null field or to limit a text-box to a max number of characters.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 09, 2007 3:54 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
That's what JBoss Seam do. It propagates the validation to the JSF components. Check the code

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.