package org.simantics.acorn; import java.io.InputStream; import org.simantics.db.Session; import org.simantics.db.exception.DatabaseException; import org.simantics.db.impl.ClusterBase; import org.simantics.db.impl.ClusterSupport; import org.simantics.db.impl.IClusterTable; import org.simantics.db.service.ClusterUID; public class UndoClusterSupport implements ClusterSupport { final ClusterManager impl; public UndoClusterSupport(ClusterManager impl) { this.impl = impl; } @Override public int createClusterKeyByClusterUID(ClusterUID clusterUID, long clusterId) { throw new UnsupportedOperationException(); } @Override public ClusterBase getClusterByClusterUIDOrMake(ClusterUID clusterUID) { throw new UnsupportedOperationException(); } @Override public ClusterBase getClusterByClusterId(long clusterId) { throw new UnsupportedOperationException(); } @Override public ClusterBase getClusterByClusterKey(int clusterKey) { try { return impl.getClusterByClusterKey(clusterKey); } catch (DatabaseException e) { e.printStackTrace(); return null; } } @Override public int getClusterKeyByClusterUIDOrMake(ClusterUID clusterUID) { throw new UnsupportedOperationException(); } @Override public ClusterBase getClusterByResourceKey(int resourceKey) { throw new UnsupportedOperationException(); } @Override public long getClusterIdOrCreate(ClusterUID clusterUID) { throw new UnsupportedOperationException(); } @Override public void addStatement(Object cluster) { } @Override public void cancelStatement(Object cluster) { throw new UnsupportedOperationException(); } @Override public void removeStatement(Object cluster) { } @Override public void cancelValue(Object cluster) { throw new UnsupportedOperationException(); } @Override public void removeValue(Object cluster) { throw new UnsupportedOperationException(); } @Override public void setValue(Object cluster, long clusterId, byte[] bytes, int length) { } @Override public void modiValue(Object cluster, long clusterId, long voffset, int length, byte[] bytes, int offset) { throw new UnsupportedOperationException(); } @Override public void setImmutable(Object cluster, boolean immutable) { throw new UnsupportedOperationException(); } @Override public void setDeleted(Object cluster, boolean deleted) { throw new UnsupportedOperationException(); } @Override public void createResource(Object cluster, short resourceIndex, long clusterId) { throw new UnsupportedOperationException(); } @Override public void addStatementIndex(Object cluster, int resourceKey, ClusterUID clusterUID, byte op) { } @Override public void setStreamOff(boolean setOff) { throw new UnsupportedOperationException(); } @Override public boolean getStreamOff() { throw new UnsupportedOperationException(); } @Override public InputStream getValueStreamEx(int resourceIndex, long clusterId) throws DatabaseException { throw new UnsupportedOperationException(); } @Override public byte[] getValueEx(int resourceIndex, long clusterId) throws DatabaseException { throw new UnsupportedOperationException(); } @Override public byte[] getValueEx(int resourceIndex, long clusterId, long voffset, int length) throws DatabaseException { throw new UnsupportedOperationException(); } @Override public long getValueSizeEx(int resourceIndex, long clusterId) throws DatabaseException { throw new UnsupportedOperationException(); } @Override public int wait4RequestsLess(int limit) throws DatabaseException { throw new UnsupportedOperationException(); } @Override public Session getSession() { throw new UnsupportedOperationException(); } @Override public IClusterTable getClusterTable() { throw new UnsupportedOperationException(); } @Override public int getClusterKeyByClusterUIDOrMake(long id1, long id2) { throw new UnsupportedOperationException(); } }