X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.common%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fcommon%2FCommentMetadata.java;fp=bundles%2Forg.simantics.db.common%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fcommon%2FCommentMetadata.java;h=4a79eaf547c4ffcf83326c53797843d6cd08eca6;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/CommentMetadata.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/CommentMetadata.java new file mode 100644 index 000000000..4a79eaf54 --- /dev/null +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/CommentMetadata.java @@ -0,0 +1,25 @@ +package org.simantics.db.common; + +import java.util.TreeMap; + +import org.simantics.db.Session; +import org.simantics.db.common.utils.Logger; + +public class CommentMetadata extends ACommentMetadata { + public CommentMetadata(TreeMap metadata) { + super(metadata); + } + + public CommentMetadata(byte[] data) { + super(data); + } + + public static CommentMetadata deserialise(Session session, byte[] input) { + try { + return new CommentMetadata(input); + } catch (Throwable e) { + Logger.defaultLogError(e); + } + return new CommentMetadata((byte[])null); + } +}