diff --git a/src/main/java/hu/blackbelt/judo/dao/api/DAO.java b/src/main/java/hu/blackbelt/judo/dao/api/DAO.java index a6f189d..3807671 100644 --- a/src/main/java/hu/blackbelt/judo/dao/api/DAO.java +++ b/src/main/java/hu/blackbelt/judo/dao/api/DAO.java @@ -28,10 +28,7 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EReference; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.util.*; public interface DAO { @@ -156,6 +153,17 @@ public interface DAO { */ Optional searchByIdentifier(EClass clazz, ID identifier, QueryCustomizer queryCustomizer); + /** + * Checks whether an instance of a given mapped transfer object type with the given identifier exists. + *

+ * This operation can be used by JCL (expression) and custom Java sources. + * + * @param clazz mapped transfer object type + * @param identifier mapped transfer object + * @return returns whether the given instance exists + */ + boolean existsById(EClass clazz, ID identifier); + /** * Get (entity) metadata of a given mapped transfer object type by identifier. *