]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/MetadataI.java
Fail safe import fixes made by Antti
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / MetadataI.java
1 package org.simantics.db;
2
3 import java.util.TreeMap;
4
5 import org.simantics.db.exception.ServiceException;
6
7 public interface MetadataI {
8     /**
9      * Sets given meta data to be used with next commit.
10      * 
11      * @param metadata
12      * @throws ServiceException
13      */
14     <T> void addMetadata(Metadata metadata) throws ServiceException;
15
16     /**
17      * Returns asked class from the meta data of next commit.
18      * 
19      * @param clazz asked class
20      * @return instance of asked class
21      * @throws ServiceException
22      */
23     <T extends Metadata> T getMetadata(Class<T> clazz) throws ServiceException;
24     /**
25      * Returns meta data serialized for next commit.
26      * 
27      * @return meta data
28      */
29     TreeMap<String, byte[]> getMetadata();
30 }