TOP

JPA and custom data types

I even answered a guy in the Hibernate community how to map a datatype like java.net.URL and than I asked myself why some people have problems to provide them in a JPA annotated bean. It is very easy and you don’t have to implement any special JPA provider dependent interface. The solution is so easy. Break your bean down into their properties and annotate this properties as you normally do. And than – no magic – do your mapping in your getter and setter operation. Through this, you hide the information that your bean does not hold a value of your complex type. You break the type down in a setter and recreate it in the getter operation. For performance you can hold a field of your complex type and annotate it with the javax.persistence.Transient annotation.

14 comments. Leave a Reply

  1. Pingback: hello world

  2. Pingback: sertralin

  3. Pingback: furosemide

  4. Pingback: dexlansoprazole cap 60mg generic

  5. Pingback: fluconazole 100 mg tablet for oral thrush

  6. Pingback: cenforce red pill

  7. Pingback: is cenforce 200 safe

  8. Pingback: omeprazole adult dosing

  9. Pingback: avanafil generic online

  10. Pingback: semaglutid tablett receptfritt sverige

  11. Pingback: doxycycline monohydrate for lyme

  12. Pingback: cialis online 20mg

  13. Pingback: bupropion hcl for smoking

  14. Pingback: xenical reviews

Leave a Reply

Your email is never published nor shared.

You may use these HTML tags and attributes:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*