Hi,
I need to map the following data (excerpt from a POJO made from an
XSD using Castor framework, this code can't be modified):
public void setAdditionalEMail(java.lang.String[] additionalEMailArray)
{
_additionalEMailList.clear();
for (int i = 0; i < additionalEMailArray.length; i++) {
_additionalEMailList.add(additionalEMailArray[i]);
}
}
public java.lang.String[] getAdditionalEMail()
{
int size = _additionalEMailList.size();
java.lang.String[] mArray = new java.lang.String[size];
for (int index = 0; index < size; index++) {
mArray[index] = (String)_additionalEMailList.get(index);
}
return mArray;
}
into an ADDITIONAL_EMAIL column where the mail addresses concatenated
to each other with a ';', this will be stored in a single string (like for ex.:
"me.you@yahoo.fr;ik.jouw@hotmail.be;steve@gmail.com").
Do you think there's a way to convert a String[] with String[0] = "me.you@yahoo.fr",
String[1] = "ik.jouw@hotmail.be" etc... to a single VARCHAR string
'me.you@yahoo.fr;ik.jouw@hotmail.be' *without* using a custom type ? Using the
<array> mapping element maybe ?
Any idea ?
Thanks lot...
Regards,
Seb