} else if (Long[].class.equals(type)) {
return type.cast(property.getValuesAsArray(context().getValueFactories().getLongFactory()));
} else if (Boolean[].class.equals(type)) {
return type.cast(property.getValuesAsArray(context().getValueFactories().getBooleanFactory()));
} else if (Date[].class.equals(type)) {
final DateTimeFactory dateFactory = context().getValueFactories().getDateFactory();
Date[] result = property.getValuesAsArray(new Property.ValueTypeTransformer<Date>() {
@Override
public Date transform( Object value ) {
return dateFactory.create(value).toDate();
}
}, Date.class);
return type.cast(result);
} else if (Calendar[].class.equals(type)) {
final DateTimeFactory dateFactory = context().getValueFactories().getDateFactory();
Calendar[] result = property.getValuesAsArray(new Property.ValueTypeTransformer<Calendar>() {
@Override
public Calendar transform( Object value ) {
return dateFactory.create(value).toCalendar();
}
}, Calendar.class);
return type.cast(result);
} else if (DateTime[].class.equals(type)) {
return type.cast(property.getValuesAsArray(context().getValueFactories().getDateFactory()));