directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <>
Subject Re: [Java to LDAP Type Mapping] Double, Long, etc.
Date Wed, 20 Jun 2007 19:31:42 GMT

Emmanuel Lecharny wrote:
> <totally OT>
> I personnaly think that Int, Double, Long, Character, Int are classes 
> which should have never existed in Java. They have been created a long 
> time ago in purpose, because they wanted int, long, float, boolean, etc 
> to be native types for performance reasons. This leads to complexity, 
> and have abused a lot of newbies (me included when I started in java 
> back in 1996). They suddenly decided that auto-boxing was needed just 
> because M$ did it in C#.

Yeah - I think I use String 90% of the time, boolean the other 8%, and the other 2%
are what's left over.
> Now, some may object that those classes are immutable, and this was the 
> reason they were created.
> </totally OT>
> Ok, now, I would say that you should simply store int, long, float, etc 
> instead of the associated classes.
Oh Yeah - Sorry I should have distinguished between primitives and classes.  I really meant
the primitives.  Originally I was just planning on using the AcceptAllSyntaxChecker for all
the java types, and then I would just convert them back to whatever they are after they cross
the wire and arrive at the client.  So I tried it out, and I noticed that all the values come
back in hex.  I could convert from hex to the corresponding java type, but then I thought
"What about queries?".  So I figured I'd better map them to LDAP syntaxes, so that queries
go OK.  So integers map fine, but if someone wanted to query on decimals?  Probably a low
utility scenario, but I think a lot of people would be "Pleased" if their decimals could be
handled by the server.  I looked at rfc2252 and it sort of looks like LDAP has decided to
leave decimals to RDBs.  The only thing that looks like it might fit is "Numeric String".

- Ole

View raw message