Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #17004

Re: Type of a generic class?

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: Type of a generic class?
Date Thu, 02 Aug 2012 14:08:00 -0700
Organization A noiseless patient Spider
Lines 33
Message-ID <jveq7j$2mo$1@dont-email.me> (permalink)
References <qivqe9-k9.ln1@whirlwind.fredriksson.dy.fi>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 2 Aug 2012 21:08:03 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="2776"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Eei94/B+wBESkW4avuWzP8doF9jRtN18="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
In-Reply-To <qivqe9-k9.ln1@whirlwind.fredriksson.dy.fi>
Cancel-Lock sha1:gR/J8q1G/oRHZdmWsF3etXtOur8=
Xref csiph.com comp.lang.java.programmer:17004

Show key headers only | View raw


On 8/2/2012 12:04 PM, Donkey Hottie wrote:

> First problem I have is to translate the type to a lower level
> application API call. I can not leave the cast or type conversion to
> compiler only.


I'm going to ignore other obvious problems and simply focus on the big 
picture here.  You idea how to accomplish this looks *TERRIBLE*.  Why 
aren't you using some kind of ORM?  At least use a light-weight library 
for translating data base entities into objects.

<http://commons.apache.org/dbutils/>

Also JPA will do some kinds of automatic instantiation for you:

<http://openjpa.apache.org/builds/1.0.4/apache-openjpa-1.0.4/docs/manual/jpa_overview_mapping_inher.html>

I didn't check to see if those are the most recent docs (I don't use 
this sort of feature).  Google for "JPA table inheritance" and check 
through the results carefully.


> Class is a simple version containg only the important parts.


Honestly, while we all appreciate the attempt, you example is far from 
complete.  We can guess at a few things, but you should think much more 
carefully at what the real problem is and design something to illustrate 
it.


Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Type of a generic class? Donkey Hottie <donkey@fredriksson.dy.fi> - 2012-08-02 22:04 +0300
  Re: Type of a generic class? Lew <lewbloch@gmail.com> - 2012-08-02 14:01 -0700
  Re: Type of a generic class? markspace <-@.> - 2012-08-02 14:08 -0700
    Re: Type of a generic class? Donkey Hottie <donkey@fredriksson.dy.fi> - 2012-08-03 02:27 +0300
      Re: Type of a generic class? Lew <lewbloch@gmail.com> - 2012-08-02 16:51 -0700
      Re: Type of a generic class? markspace <-@.> - 2012-08-02 20:08 -0700
        Re: Type of a generic class? Donkey Hottie <donkey@fredriksson.dy.fi> - 2012-08-03 17:25 +0300
  Re: Type of a generic class? Donkey Hottie <donkey@fredriksson.dy.fi> - 2012-08-04 13:46 +0300

csiph-web