X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fgenericrelation%2FAbstractRelation.java;h=45ad75caa9432376b2f02cf7d3da629bcebd9384;hb=5e340942bc7de041b75c6ba281617eb0c800f30a;hp=c942b106173c5cc5188d3f291ac5407aef7aaea0;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/AbstractRelation.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/AbstractRelation.java index c942b1061..45ad75caa 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/AbstractRelation.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/AbstractRelation.java @@ -1,47 +1,47 @@ -/******************************************************************************* - * 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.layer0.genericrelation; - -import java.util.List; - -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.adapter.GenericRelation; -import org.simantics.db.layer0.genericrelation.combinators.SelectByRelation; -import org.simantics.db.layer0.genericrelation.combinators.Selection; - -/** - * Default implementation for some methods of IRelation interface. - */ -public abstract class AbstractRelation implements GenericRelation { - - @Override - public boolean isRealizable() { - return false; - } - - @Override - public List realize(ReadGraph g) throws DatabaseException { - throw new UnsupportedOperationException(); - } - - @Override - public GenericRelation select(String bindingPattern, Object[] constants) { - return new Selection(this, bindingPattern, constants); - } - - @Override - public GenericRelation selectByRelation(String bindingPattern, GenericRelation constraint) { - return new SelectByRelation(this, bindingPattern, constraint); - } - -} +/******************************************************************************* + * 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.layer0.genericrelation; + +import java.util.List; + +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.GenericRelation; +import org.simantics.db.layer0.genericrelation.combinators.SelectByRelation; +import org.simantics.db.layer0.genericrelation.combinators.Selection; + +/** + * Default implementation for some methods of IRelation interface. + */ +public abstract class AbstractRelation implements GenericRelation { + + @Override + public boolean isRealizable() { + return false; + } + + @Override + public List realize(ReadGraph g) throws DatabaseException { + throw new UnsupportedOperationException(); + } + + @Override + public GenericRelation select(String bindingPattern, Object[] constants) { + return new Selection(this, bindingPattern, constants); + } + + @Override + public GenericRelation selectByRelation(String bindingPattern, GenericRelation constraint) { + return new SelectByRelation(this, bindingPattern, constraint); + } + +}