]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DataContainerRepresentation.java
Speeding up platform startup time
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / DataContainerRepresentation.java
1 package org.simantics.db.layer0.util;
2
3 import java.util.Map;
4
5 import org.simantics.databoard.container.DataContainer;
6 import org.simantics.db.RequestProcessor;
7 import org.simantics.db.layer0.util.SimanticsClipboard.Representation;
8 import org.simantics.utils.datastructures.hints.IHintContext.Key;
9
10 public class DataContainerRepresentation implements Representation {
11
12         final private DataContainer value;
13         
14         public DataContainerRepresentation(DataContainer value) {
15                 this.value = value;
16         }
17
18         @Override
19         public Key getKey() {
20                 return SimanticsKeys.KEY_DATA_CONTAINER;
21         }
22         
23         @SuppressWarnings("unchecked")
24         @Override
25         public <T> T getValue(RequestProcessor processor, Map<String,Object> hints) {
26                 return (T)value;
27         }
28         
29 }