Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #17073
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news-out.news.tds.net!newsreading01.news.tds.net!53ab2750!not-for-mail |
|---|---|
| From | "Lew" <lew@1:261/38.remove-yy0-this> |
| Subject | Re: Type of a generic class? |
| Message-ID | <501C1566.56032.calajapr@time.synchro.net> (permalink) |
| X-Comment-To | Donkey Hottie |
| Newsgroups | comp.lang.java.programmer |
| In-Reply-To | <501C1565.56029.calajapr@time.synchro.net> |
| References | <501C1565.56029.calajapr@time.synchro.net> |
| X-FTN-AREA | COMP.LANG.JAVA.PROGRAMMER |
| X-FTN-MSGID | 1:261/38 408916e5 |
| X-FTN-REPLY | 1:261/38 cd329b9a |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.16a-Win32 NewsLink 1.98] |
| Lines | 54 |
| Date | Fri, 03 Aug 2012 18:54:17 GMT |
| NNTP-Posting-Host | 69.21.70.65 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1344020057 69.21.70.65 (Fri, 03 Aug 2012 13:54:17 CDT) |
| NNTP-Posting-Date | Fri, 03 Aug 2012 13:54:17 CDT |
| Organization | tds.net |
| X-Received-Bytes | 2382 |
| Xref | csiph.com comp.lang.java.programmer:17073 |
Show key headers only | View raw
To: Donkey Hottie
From: Lew <lewbloch@gmail.com>
Donkey Hottie wrote:
> markspace kirjoitti:
>> ...
> I am trying to convert a simple { String name, String value } pair in
How about a Map<String, Global<?>>
Also, you should move that if-chain reflection out of your app and use
polymorphism instead.
> database to a Global<T>(name) so that it will convert the Java simple
> datatypes to a string and back. This is for system parameters,
> configuration parameters.
>
>> It is indeed kind of spooky and strange idea, after all what is so wrong
>> about simple
> String value = SystemProperties.getString("ParamName") ;
>
> It is OK, but I'm kind of toying with idea of strong typing of System
> Parameters: A Date can not be stored as Long or Double etc..
Using strings to look up types is not strong typing.
>
> The back end of the system parameters is simply
>
>
>
> CREATE TABLE SystemParameters
> (
> name varchar(64) not null primary_key,
> value varchar(512)
> ) ;
>
>
> That's it. That is have the table is given to me. But I want to make the
> Java code bit more pedantic on the types of the parameters it uses and
> maintains.
JPA does that for you, too.
Anyway, your use of reflection is anti-pedantic.
--
Lew
--- BBBS/Li6 v4.10 Dada-1
* Origin: Prism bbs (1:261/38)
--- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Type of a generic class? "Donkey Hottie" <donkey.hottie@1:261/38.remove-yy0-this> - 2012-08-03 18:54 +0000
Re: Type of a generic class? "Lew" <lew@1:261/38.remove-yy0-this> - 2012-08-03 18:54 +0000
Re: Type of a generic class? "markspace" <markspace@1:261/38.remove-yy0-this> - 2012-08-03 18:54 +0000
Re: Type of a generic class? "Donkey Hottie" <donkey.hottie@1:261/38.remove-yy0-this> - 2012-08-03 18:54 +0000
Re: Type of a generic class? "Lew" <lew@1:261/38.remove-yy0-this> - 2012-08-03 18:54 +0000
Re: Type of a generic class? "markspace" <markspace@1:261/38.remove-yy0-this> - 2012-08-03 18:54 +0000
Re: Type of a generic class? "Donkey Hottie" <donkey.hottie@1:261/38.remove-yy0-this> - 2012-08-03 18:54 +0000
Re: Type of a generic class? "Donkey Hottie" <donkey.hottie@1:261/38.remove-5qr-this> - 2012-08-04 18:41 +0000
csiph-web