public interface TopiaQueryBuilderRunQueryWithUniqueResultStep<E extends TopiaEntity>
TopiaQueryBuilderRunQueryStep for certain API methods that should not allow findAll.| Modifier and Type | Method and Description |
|---|---|
boolean |
exists() |
E |
findUnique()
Get the first element of a single-element result set.
|
E |
findUniqueOrNull()
Get the first element of a single-element result set or null if query result is empty.
|
com.google.common.base.Optional<E> |
tryFindUnique()
Get the first element of a single-element result set.
|
boolean exists()
E findUnique() throws TopiaNoResultException, TopiaNonUniqueResultException
TopiaNonUniqueResultException - if the query returns more than one element.TopiaNoResultException - if the query does not return any result.E findUniqueOrNull() throws TopiaNonUniqueResultException
tryFindUnique() but allows you to prevent using Guava in you project.TopiaNonUniqueResultException - if the query returns more than one element.com.google.common.base.Optional<E> tryFindUnique() throws TopiaNonUniqueResultException
findUnique()TopiaNonUniqueResultException - if the query returns more than one element.Copyright © 2004–2017 CodeLutin. All rights reserved.