-->
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.  [ 1 post ] 
Author Message
 Post subject: Read query result before invoke getEntity() allocation
PostPosted: Thu May 21, 2015 6:07 am 
Newbie

Joined: Fri May 15, 2015 3:55 am
Posts: 2
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.


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

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.