Hi everyone, i'm stuck on this, i have this project where i must intercept the result get/read with classical CRUD operation of hibernate but before the allocation on the referenced java object.
Given for a example the java object: Obj(Integer doc_id,URL url,String city); on the database i have on the "url" column some value with protocol "http://" and some value without. So when i invoke the "getEntity()" method on the interceptor class,i'm get the exception "MalformedUrlException" for the values without protocoll. So i just want to check if the url value has the protocol and if don't have make a append "http://" on the value.tostring() before make the getEntity() method. Any suggestion? P.S. I just started to use hibernate so forgive me if the solution is already present on the documentation and i misssed.
|