Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/mapper/BigIntegerTypeMapper.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/mapper/BigIntegerTypeMapper.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/mapper/BigIntegerTypeMapper.java b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/mapper/BigIntegerTypeMapper.java
index 3c6cf3dae2..a2f91bce9b 100644
--- a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/mapper/BigIntegerTypeMapper.java
+++ b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/mapper/BigIntegerTypeMapper.java
@@ -34,14 +34,18 @@ public class BigIntegerTypeMapper extends StringTypeMapper
@Override
public Object getValue(ObjyObject objyObject, EStructuralFeature feature)
{
- Class_Position nullPosition = getNullAttributePosition(objyObject, feature);
- boolean isNull = objyObject.get_numeric(nullPosition).booleanValue();
+ // Class_Position nullPosition = getNullAttributePosition(objyObject, feature);
+ String nullAttributeName = getNullAttributeName(feature);
+
+ boolean isNull = objyObject.get_numeric(nullAttributeName/* nullPosition */).booleanValue();
Object value = null;
if (!isNull)
{
- Class_Position position = getAttributePosition(objyObject, feature);
- String_Value stringValue = objyObject.get_string(position);
+ // Class_Position position = getAttributePosition(objyObject, feature);
+ String attributeName = getAttributeName(feature);
+
+ String_Value stringValue = objyObject.get_string(attributeName/* position */);
value = new BigInteger(stringValue.toString());
}
// else if (feature.isUnsettable())
@@ -55,7 +59,8 @@ public class BigIntegerTypeMapper extends StringTypeMapper
@Override
public void setValue(ObjyObject objyObject, EStructuralFeature feature, Object newValue)
{
- Class_Position nullPosition = getNullAttributePosition(objyObject, feature);
+ // Class_Position nullPosition = getNullAttributePosition(objyObject, feature);
+ String nullAttributeName = getNullAttributeName(feature);
boolean isNull = newValue == null || newValue == CDORevisionData.NIL;
Numeric_Value isNullValue = newValue == null ? numericTrue : numericFalse;
@@ -63,12 +68,14 @@ public class BigIntegerTypeMapper extends StringTypeMapper
if (!isNull)
{
Class_Position position = getAttributePosition(objyObject, feature);
- String_Value stringValue = objyObject.get_string(position);
+ String attributeName = getAttributeName(feature);
+
+ String_Value stringValue = objyObject.get_string(attributeName/* position */);
stringValue.update();
String strValue = newValue.toString();
stringValue.set(strValue);
}
- objyObject.set_numeric(nullPosition, isNullValue);
+ objyObject.set_numeric(nullAttributeName/* nullPosition */, isNullValue);
}
@Override

Back to the top