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.databoard.type.LongType;
6 import org.simantics.db.exception.DatabaseException;
8 public enum RevisionTGValueModifier implements TGValueModifier {
11 public static final Long DEFAULT_VALUE = Long.valueOf(-1);
14 public boolean mayNeedModification(Datatype type) {
15 return type instanceof LongType
16 && "revision".equals(type.metadata.get("unit"));
20 public Object modify(final DomainProcessorState state, Binding binding, Object value) throws DatabaseException {