]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/annotations/LinkedListGet.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.objmap2 / src / org / simantics / objmap / graph / annotations / LinkedListGet.java
1 /*******************************************************************************
2  * Copyright (c) 2019 Association for Decentralized Information Management in
3  * Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     Semantum oy - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.objmap.graph.annotations;
13
14 import java.lang.annotation.ElementType;
15 import java.lang.annotation.Retention;
16 import java.lang.annotation.RetentionPolicy;
17 import java.lang.annotation.Target;
18
19 import org.simantics.layer0.Layer0;
20 import org.simantics.objmap.graph.annotations.meta.IsCollectionRule;
21
22 /**
23  * A get method that returns the contents of a linked list mapped to the single object of
24  * a given relation.
25  */
26 @Retention(RetentionPolicy.RUNTIME)
27 @Target(ElementType.METHOD)
28 @IsCollectionRule
29 @HasCollectionAdder(LinkedListAdd.class)
30 @HasCollectionRemover(LinkedListRem.class)
31 public @interface LinkedListGet {
32         String value();
33         String type() default Layer0.URIs.List;
34         boolean composition() default false;
35 }