1 package org.simantics.db.layer0.util;
3 import org.simantics.databoard.binding.Binding;
4 import org.simantics.databoard.type.Datatype;
5 import org.simantics.db.exception.DatabaseException;
7 public class ComposedTGValueModifier implements TGValueModifier {
9 final TGValueModifier[] modifiers;
11 public ComposedTGValueModifier(TGValueModifier[] modifiers) {
12 this.modifiers = modifiers;
16 public boolean mayNeedModification(Datatype type) throws DatabaseException {
17 for(TGValueModifier mod : modifiers)
18 if(mod.mayNeedModification(type))
24 public Object modify(final DomainProcessorState state, Binding binding, Object value) throws DatabaseException {
26 Datatype type = binding.type();
28 for(TGValueModifier mod : modifiers)
29 if(mod.mayNeedModification(type))
30 value = mod.modify(state, binding, value);