]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/function/DbSupplier.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / function / DbSupplier.java
1 /*******************************************************************************\r
2  * Copyright (c) 2016 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     Semantum Oy - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.db.function;\r
13 \r
14 import org.simantics.db.exception.DatabaseException;\r
15 \r
16 /**\r
17  * Represents a supplier of results for database operations.\r
18  *\r
19  * <p>There is no requirement that a new or distinct result be returned each\r
20  * time the supplier is invoked.\r
21  *\r
22  * @param <T> the type of results supplied by this supplier\r
23  *\r
24  * @author Tuukka Lehtonen\r
25  * @since 1.22.1 & 1.24.0\r
26  */\r
27 @FunctionalInterface\r
28 public interface DbSupplier<T> {\r
29 \r
30     /**\r
31      * Performs this operation on the given argument.\r
32      *\r
33      * @param t the input argument\r
34      */\r
35     T get() throws DatabaseException;\r
36 \r
37 }\r