tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [OT] Help with java Lists
Date Wed, 12 Dec 2007 21:59:43 GMT
Hash: SHA1


David kerber wrote:
> My primary job is database design and management; the java side is where
> I'm weak, and I've spent a LOT of time on these queries, including
> pushing through some design changes that have helped a lot, but not enough.

Okay. Forgive my comments about proper database care and feeding...
usually this list attracts programmers that don't know much about databases.

>> map.put(myDataObj, myDataObj)?
> I thought of that, but there is a lot more data in the object than just
> the stuff I need to search on.  Once I identify the particular object
> instance I need (which only needs those 3 fields), there are about a
> dozen other fields I need to retrieve from it to process each record.

That's fine. If you only use 3 fields for identification, there's no
harm in keeping all that data together in a single object. It's not like
it uses up any more memory. Actually, you might be saving a bit of
memory since you won't need separate key and value objects.

>> When in doubt, abstract: write yourself a helper class that bundles all
>> this odd logic together. Then, your business code will be a lot simpler
>> to read, and you can separately unit test your
>> SpecializedTreeSetHashMapLinkedList class (or whatever). ;)
> Yeah, that's what I'm working on right now.  It's coming together,
> though somewhat slowly since I'm still getting my head around the
> different kinds of maps and lists, and what each of them is good for.

It's always worth it to read though the entire java.util API. There are
some great classes in there.

- -chris
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message