-->
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.  [ 2 posts ] 
Author Message
 Post subject: NullableType NullSafeSet
PostPosted: Mon Apr 10, 2006 1:14 pm 
Beginner
Beginner

Joined: Wed Oct 05, 2005 5:35 am
Posts: 47
Location: France
Hi guys,
Is there any good reason NullableType.NullSafeSet is not overridable?
If you look at it - it forwards to NullableType.Set, so yeah, I could override the Set. But the pb is NullableType.NullSafeSet does also a bit more:
Code:
if( value == null )
        { ( ( IDataParameter ) cmd.Parameters[ index ] ).Value = DBNull.Value; }
.... else -> forward to Set

And that's exactly the bit I need to work differently.
Maybe NullableType.NullSafeSet could delegate all processing to Set?
Or be virtual?
Or I just need some sleep?
Tx, Alex


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 11, 2006 7:05 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Derive your type from another class instead, such as AbstractType.


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

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.