X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.services%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fservices%2Fadaption%2Freflection%2FAtMostOneRelatedResource2.java;h=753102639c2b7da844059108cd9f52aef32ea231;hb=02568e34b3d212fc50d8d6630da4bde8876f55c0;hp=b848f04e9069f9105d331c57be30554bc330f4e9;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/reflection/AtMostOneRelatedResource2.java b/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/reflection/AtMostOneRelatedResource2.java index b848f04e9..753102639 100644 --- a/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/reflection/AtMostOneRelatedResource2.java +++ b/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/reflection/AtMostOneRelatedResource2.java @@ -1,36 +1,36 @@ -/******************************************************************************* - * 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.services.adaption.reflection; - -import org.simantics.db.Resource; -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; - -public class AtMostOneRelatedResource2 implements IDynamicAdapter2 { - - Resource relation; - - public AtMostOneRelatedResource2(Resource relation) { - this.relation = relation; - } - - @Override - public Class getType() { - return Resource.class; - } - - @Override - public Resource adapt(ReadGraph g, Resource r) throws DatabaseException { - return g.getPossibleObject(r, relation); - } - -} +/******************************************************************************* + * 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.services.adaption.reflection; + +import org.simantics.db.Resource; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; + +public class AtMostOneRelatedResource2 implements IDynamicAdapter2 { + + Resource relation; + + public AtMostOneRelatedResource2(Resource relation) { + this.relation = relation; + } + + @Override + public Class getType() { + return Resource.class; + } + + @Override + public Resource adapt(ReadGraph g, Resource r) throws DatabaseException { + return g.getPossibleObject(r, relation); + } + +}