X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fservice%2FSerialisationSupport.java;h=207be395804469aa7dbe9f1b13bfa496f0a7d993;hb=refs%2Fchanges%2F38%2F238%2F2;hp=80ba536a2824358af4a794b4f9d6a7ec4497e65e;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db/src/org/simantics/db/service/SerialisationSupport.java b/bundles/org.simantics.db/src/org/simantics/db/service/SerialisationSupport.java index 80ba536a2..207be3958 100644 --- a/bundles/org.simantics.db/src/org/simantics/db/service/SerialisationSupport.java +++ b/bundles/org.simantics.db/src/org/simantics/db/service/SerialisationSupport.java @@ -1,38 +1,38 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db.service; - -import org.simantics.db.Resource; -import org.simantics.db.ResourceSerializer; -import org.simantics.db.exception.DatabaseException; - -public interface SerialisationSupport { - - /** - * Get a ResourceSerializer for this session which can be used to - * serialize Resource instances to string and back. - */ - ResourceSerializer getResourceSerializer(); - - Resource getResource(long randomAccessId) throws DatabaseException; - Resource getResource(int transientId) throws DatabaseException; - - int getTransientId(Resource resource) throws DatabaseException; - long getRandomAccessId(Resource resource) throws DatabaseException; - - int getTransientId(long randomAccessId) throws DatabaseException; - long getRandomAccessId(int transientId) throws DatabaseException; - - ResourceUID getUID(Resource resource) throws DatabaseException; - Resource getResource(ResourceUID uid) throws DatabaseException; - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.db.service; + +import org.simantics.db.Resource; +import org.simantics.db.ResourceSerializer; +import org.simantics.db.exception.DatabaseException; + +public interface SerialisationSupport { + + /** + * Get a ResourceSerializer for this session which can be used to + * serialize Resource instances to string and back. + */ + ResourceSerializer getResourceSerializer(); + + Resource getResource(long randomAccessId) throws DatabaseException; + Resource getResource(int transientId) throws DatabaseException; + + int getTransientId(Resource resource) throws DatabaseException; + long getRandomAccessId(Resource resource) throws DatabaseException; + + int getTransientId(long randomAccessId) throws DatabaseException; + long getRandomAccessId(int transientId) throws DatabaseException; + + ResourceUID getUID(Resource resource) throws DatabaseException; + Resource getResource(ResourceUID uid) throws DatabaseException; + +}