-package org.simantics.db.layer0.util;\r
-\r
-import org.simantics.databoard.binding.Binding;\r
-import org.simantics.databoard.type.Datatype;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-public class ComposedTGValueModifier implements TGValueModifier {\r
-\r
- final TGValueModifier[] modifiers;\r
- \r
- public ComposedTGValueModifier(TGValueModifier[] modifiers) {\r
- this.modifiers = modifiers;\r
- }\r
- \r
- @Override\r
- public boolean mayNeedModification(Datatype type) throws DatabaseException {\r
- for(TGValueModifier mod : modifiers)\r
- if(mod.mayNeedModification(type))\r
- return true;\r
- return false;\r
- }\r
-\r
- @Override\r
- public Object modify(final DomainProcessorState state, Binding binding, Object value) throws DatabaseException {\r
-\r
- Datatype type = binding.type();\r
- \r
- for(TGValueModifier mod : modifiers)\r
- if(mod.mayNeedModification(type))\r
- value = mod.modify(state, binding, value);\r
- \r
- return value;\r
- \r
- }\r
-\r
-}\r
+package org.simantics.db.layer0.util;
+
+import org.simantics.databoard.binding.Binding;
+import org.simantics.databoard.type.Datatype;
+import org.simantics.db.exception.DatabaseException;
+
+public class ComposedTGValueModifier implements TGValueModifier {
+
+ final TGValueModifier[] modifiers;
+
+ public ComposedTGValueModifier(TGValueModifier[] modifiers) {
+ this.modifiers = modifiers;
+ }
+
+ @Override
+ public boolean mayNeedModification(Datatype type) throws DatabaseException {
+ for(TGValueModifier mod : modifiers)
+ if(mod.mayNeedModification(type))
+ return true;
+ return false;
+ }
+
+ @Override
+ public Object modify(final DomainProcessorState state, Binding binding, Object value) throws DatabaseException {
+
+ Datatype type = binding.type();
+
+ for(TGValueModifier mod : modifiers)
+ if(mod.mayNeedModification(type))
+ value = mod.modify(state, binding, value);
+
+ return value;
+
+ }
+
+}