commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nodje <nodje...@gmail.com>
Subject [Lang] excluding Fields in ReflectionToStringBuilder
Date Fri, 05 Jun 2009 10:47:25 GMT

Hi,

I'm using ReflectionToStringBuilder to build a default toString() for all my
Hibernate entities.
It creates problem with non initialized Fields when outside of an open
session.

Basically, I'd like to be able to exclude all entity subobjects by putting
them in ExcludeFieldNames so that they don't get accessed.

I can't see any way to do that with the actual implementation. Do you think
it's possible at all with the actual 2.4 implementation? What about 2.5.

If not, I'll certainly have to implement my own ReflectionToStringBuilder
with the ability of exluding fields that are <? extends ModelObject>. I wish
I woudn't have to use 'instanceof' but I can't see any other way.

thanks for your help.
-- 
View this message in context: http://www.nabble.com/-Lang--excluding-Fields-in-ReflectionToStringBuilder-tp23886050p23886050.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message