]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.acorn/src/org/simantics/acorn/UndoClusterSupport.java
Merge commit '12468c2'
[simantics/platform.git] / bundles / org.simantics.acorn / src / org / simantics / acorn / UndoClusterSupport.java
1 package org.simantics.acorn;
2
3 import java.io.InputStream;
4
5 import org.simantics.db.Session;
6 import org.simantics.db.exception.DatabaseException;
7 import org.simantics.db.impl.ClusterBase;
8 import org.simantics.db.impl.ClusterSupport;
9 import org.simantics.db.impl.IClusterTable;
10 import org.simantics.db.service.ClusterUID;
11
12 public class UndoClusterSupport implements ClusterSupport {
13
14         final ClusterManager impl;
15         
16         public UndoClusterSupport(ClusterManager impl) {
17                 this.impl = impl;
18         }
19         
20         @Override
21         public int createClusterKeyByClusterUID(ClusterUID clusterUID,
22                         long clusterId) {
23                 throw new UnsupportedOperationException();
24         }
25
26         @Override
27         public ClusterBase getClusterByClusterUIDOrMake(ClusterUID clusterUID) {
28                 throw new UnsupportedOperationException();
29         }
30
31         @Override
32         public ClusterBase getClusterByClusterId(long clusterId) {
33                 throw new UnsupportedOperationException();
34         }
35
36         @Override
37         public ClusterBase getClusterByClusterKey(int clusterKey) {
38                 try {
39             return impl.getClusterByClusterKey(clusterKey);
40         } catch (DatabaseException e) {
41             e.printStackTrace();
42             return null;
43         }
44         }
45
46         @Override
47         public int getClusterKeyByClusterUIDOrMake(ClusterUID clusterUID) {
48                 throw new UnsupportedOperationException();
49         }
50
51         @Override
52         public ClusterBase getClusterByResourceKey(int resourceKey) {
53                 throw new UnsupportedOperationException();
54         }
55
56         @Override
57         public long getClusterIdOrCreate(ClusterUID clusterUID) {
58                 throw new UnsupportedOperationException();
59         }
60
61         @Override
62         public void addStatement(Object cluster) {
63         }
64
65         @Override
66         public void cancelStatement(Object cluster) {
67                 throw new UnsupportedOperationException();
68         }
69
70         @Override
71         public void removeStatement(Object cluster) {
72         }
73
74         @Override
75         public void cancelValue(Object cluster) {
76                 throw new UnsupportedOperationException();
77         }
78
79         @Override
80         public void removeValue(Object cluster) {
81                 throw new UnsupportedOperationException();
82         }
83
84         @Override
85         public void setValue(Object cluster, long clusterId, byte[] bytes,
86                         int length) {
87         }
88
89         @Override
90         public void modiValue(Object cluster, long clusterId, long voffset,
91                         int length, byte[] bytes, int offset) {
92                 throw new UnsupportedOperationException();
93         }
94
95         @Override
96         public void setImmutable(Object cluster, boolean immutable) {
97                 throw new UnsupportedOperationException();
98         }
99
100         @Override
101         public void setDeleted(Object cluster, boolean deleted) {
102                 throw new UnsupportedOperationException();
103         }
104
105         @Override
106         public void createResource(Object cluster, short resourceIndex,
107                         long clusterId) {
108                 throw new UnsupportedOperationException();
109         }
110
111         @Override
112         public void addStatementIndex(Object cluster, int resourceKey,
113                         ClusterUID clusterUID, byte op) {
114         }
115
116         @Override
117         public void setStreamOff(boolean setOff) {
118                 throw new UnsupportedOperationException();
119         }
120
121         @Override
122         public boolean getStreamOff() {
123                 throw new UnsupportedOperationException();
124         }
125
126         @Override
127         public InputStream getValueStreamEx(int resourceIndex, long clusterId)
128                         throws DatabaseException {
129                 throw new UnsupportedOperationException();
130         }
131
132         @Override
133         public byte[] getValueEx(int resourceIndex, long clusterId)
134                         throws DatabaseException {
135                 throw new UnsupportedOperationException();
136         }
137
138         @Override
139         public byte[] getValueEx(int resourceIndex, long clusterId, long voffset,
140                         int length) throws DatabaseException {
141                 throw new UnsupportedOperationException();
142         }
143
144         @Override
145         public long getValueSizeEx(int resourceIndex, long clusterId)
146                         throws DatabaseException {
147                 throw new UnsupportedOperationException();
148         }
149
150         @Override
151         public int wait4RequestsLess(int limit) throws DatabaseException {
152                 throw new UnsupportedOperationException();
153         }
154
155         @Override
156         public Session getSession() {
157                 throw new UnsupportedOperationException();
158         }
159
160         @Override
161         public IClusterTable getClusterTable() {
162                 throw new UnsupportedOperationException();
163         }
164
165         @Override
166         public int getClusterKeyByClusterUIDOrMake(long id1, long id2) {
167                 throw new UnsupportedOperationException();
168         }
169
170 }