Forums Register Login

java anotation

+Pie Number of slices to send: Send
what is the benifit of java anotation?
+Pie Number of slices to send: Send
I use it for configuration purposes.

I wrote a JdbcSupport API latelty, that does automatic bean mapping for a ResultSet.

As per convention, I matched the property names of the JavaBeans to the columns. For example:



would map to the sql columns firstName and lastName.

If these however do not match, for instance if the sql columns are names first_name and last_name, I used an annotation for the mapping:



I don't know if that is the best example, but I hope it makes it clear a bit.
+Pie Number of slices to send: Send
Welcome to JavaRanch.

See Annotations in Sun's Java Tutorials.
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 921 times.
Similar Threads
Setup - JUnit and Eclipse
Getting an input from the user using command-line arguments?
left join fetch returning unordered set
Is there anyway to force a subclass to implement a default constructor
JSF 2.0 - PropertyNotFoundException
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:28:26.