* @param type the element meta type
* @return the persistence xml meta data
*/
protected PersistedArrayValue unwrapArray(PersistedArrayValue array, Object element, MetaType type)
{
PersistedArrayValue newElement = new PersistedArrayValue();
int subSize = Array.getLength(element);
for (int i = 0; i < subSize; i++)
{
PersistedValue persistedValue = null;
Object subElement = Array.get(element, i);
if (subElement instanceof MetaValue)
{
persistedValue = createPersistedValue((MetaValue) subElement, type);
}
else if (subElement != null && subElement.getClass().isArray())
{
persistedValue = unwrapArray(newElement, subElement, type);
}
newElement.addValue(persistedValue);
}
return newElement;
}