|
|
@ -184,6 +184,7 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
|
|
|
|
"Model Error: Did not read property " + property.name); //$NON-NLS-1$
|
|
|
|
"Model Error: Did not read property " + property.name); //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
// resolve properties that were retrieved with a different type than accessed
|
|
|
|
// resolve properties that were retrieved with a different type than accessed
|
|
|
|
|
|
|
|
try {
|
|
|
|
if(value instanceof String && property instanceof LongProperty)
|
|
|
|
if(value instanceof String && property instanceof LongProperty)
|
|
|
|
return (TYPE) Long.valueOf((String)value);
|
|
|
|
return (TYPE) Long.valueOf((String)value);
|
|
|
|
else if(value instanceof String && property instanceof IntegerProperty)
|
|
|
|
else if(value instanceof String && property instanceof IntegerProperty)
|
|
|
@ -193,6 +194,9 @@ public abstract class AbstractModel implements Parcelable, Cloneable {
|
|
|
|
else if(value instanceof Integer && property instanceof LongProperty)
|
|
|
|
else if(value instanceof Integer && property instanceof LongProperty)
|
|
|
|
return (TYPE) Long.valueOf(((Number)value).longValue());
|
|
|
|
return (TYPE) Long.valueOf(((Number)value).longValue());
|
|
|
|
return (TYPE) value;
|
|
|
|
return (TYPE) value;
|
|
|
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
|
|
|
|
|
return (TYPE) getDefaultValues().get(property.name);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|