*/
private void set(Property lastProperty, DataObject lastDataObject, int numInLastProperty, Object value, boolean convertValue) {
if (numInLastProperty == -1) {
if (lastDataObject != null) {
if(convertValue){
DataHelper dataHelper = ((SDODataObject)lastDataObject).getType().getHelperContext().getDataHelper();
value = dataHelper.convert(lastProperty, value);
}
lastDataObject.set(lastProperty, value);
} else {
throw new IllegalArgumentException("lastDataObject is null");
}
} else {// case like set("a/b.1", List) will cause a list be added into a existed list
List objects = lastDataObject.getList(lastProperty);
if (convertValue) {
DataHelper dataHelper = ((SDODataObject)lastDataObject).getType().getHelperContext().getDataHelper();
value = dataHelper.convert(lastProperty.getType(), value);
}
Sequence seq = lastDataObject.getSequence();
if (seq != null) {
seq.setValue(numInLastProperty, value);