You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Luke Majewski <lu...@verizon.net> on 2003/04/01 05:39:13 UTC

return type for multiValued intake field

Hi all,

I think my last post was somewhat confusing - perhaps this is easier.  Does anyone know the return type for a multiValued int (or String) field in intake?  I have the following two little lines of code as a test:

Object test = (resourceLanguageGroup.get("LanguageId").getValue());
logger.debug("What is my class type: " + test.getClass());

this gives me the class type of "[I" - literally a bracket and a capital I.  Now I also did this with a normal int field (not multivalued) and that came back as "java.lang.Integer" as expected...  anyone know what I'm supposed to do with a "[I" class if I want to insert those values into my db?  I am really stuck here, any advice would be very welcome,

Luke Majewski
Center for Promotion of Child Development Through Primary Care

RE: return type for multiValued intake field

Posted by Chris K Chew <ch...@fenetics.com>.
Hi Luke.

Sorry, I meant to reply this morning but caught up in the excitement of the
day...

public void setLanguageIds(int[] ids);

public int[] getLanguageIds();

You will probably have to rename these to something like
setIntakeLanguageIds() and getIntakeLanguageIds(), and have each method loop
through and convert them to/from something that intake provided at OM
generation.

Ck

> -----Original Message-----
> From: Luke Majewski [mailto:luke.majewski@verizon.net]
> Sent: Monday, March 31, 2003 8:39 PM
> To: Turbine Users List
> Subject: return type for multiValued intake field
>
>
> Hi all,
>
> I think my last post was somewhat confusing - perhaps this is
> easier.  Does anyone know the return type for a multiValued int
> (or String) field in intake?  I have the following two little
> lines of code as a test:
>
> Object test = (resourceLanguageGroup.get("LanguageId").getValue());
> logger.debug("What is my class type: " + test.getClass());
>
> this gives me the class type of "[I" - literally a bracket and a
> capital I.  Now I also did this with a normal int field (not
> multivalued) and that came back as "java.lang.Integer" as
> expected...  anyone know what I'm supposed to do with a "[I"
> class if I want to insert those values into my db?  I am really
> stuck here, any advice would be very welcome,
>
> Luke Majewski
> Center for Promotion of Child Development Through Primary Care


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org