-->
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: How to store a BitArray?
PostPosted: Fri Jul 21, 2006 5:11 am 
Newbie

Joined: Thu May 04, 2006 4:23 am
Posts: 16
Location: Germany
Hi,

the class BitArray is the oo counter part to an ordinary C bit vector.
But to enable arbitrary large BitArray_s there is internally an array of integer values, not just one integer.

Is there a convenient solution to store a BitArray object with NHibernate? Is there a simple and fast way (i.e., NOT via CopyTo or getEnumerator) to get the first (or all) internal integer value(s) out of the BitArray?

Regards
Mick


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 21, 2006 6:52 am 
Newbie

Joined: Thu May 04, 2006 4:23 am
Posts: 16
Location: Germany
I just found class
Code:
System.Collections.Specialized.BitVector32
This value class wraps an Int32 and allows to access this underlying int value - just what I need.

The only restriction is, that there is only a get-method for the underlying int value. The int value can only be set in the constructor.

That's why an value object of this type can not be mapped with NHibernate directly to the data base, because the name of the internal int variable is not known, so no strategy write access can be specified.
The other problem is, that BitVector32 has no standard contructor.

When reading and (re-)constructing an object, is there a way in NH to use a constructor with an argument (in order to set a read-only property)?


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.