I was storing this as an object because this field was acting as parameters
to different functions I was calling and functions had different parameter
types.

Would Generics help here  ?

so that for my pojo I can have the following instead

T a

T getA(){
   return a
}

I would just give that a quick try. Do you think that would solve this issue
for me or do you have an alternate idea  ?

-Karan




On Fri, Apr 22, 2011 at 1:08 PM, Michael Hunger <
michael.hun...@neotechnology.com> wrote:

> Why are you using
> Object a
> and not int a or Integer a
>
> SDG uses the field type and not the current value type to provide
> conversions for non primitive types.
>
> As Object is such it is converted to a String. We will look into
> accomodating for Object values in the future.
>
> By then please use the concrete type or a conversion service.
>
> M
>
> Sent from my iBrick4
>
>
> Am 21.04.2011 um 19:21 schrieb G <vlin...@gmail.com>:
>
> > I have a pojo with a field "a".
> >
> > which i initialize like this
> > Object a  = 10;
> > I store the POJO containing this field using neo4j..
> >
> > When I load this POJO, I have a getter method to get the object
> >
> > Object getA() {
> >    return a;
> > }
> >
> > *What should be the class type of a ? *
> > I am of the opinion it should be java.lang.Integer but it is coming out
> to
> > be java.lang.String
> >
> > I am assuming this is because of node.getProperty(... )
> > Is there a way I can get Integer object only.
> >
> >
> > Also what all types can be stored  ?
> >
> > thanks,
> > Karan
> > .
> > _______________________________________________
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to