public class PartTree extends Object implements Streamable<PartTree.OrPart>
String into a tree or PartTree.OrParts consisting of simple Part instances in turn.
Takes a domain class as well to validate that each of the Parts are referring to a property of the domain
class. The PartTree can then be used to build queries based on its API instead of parsing the method name for
each query execution.| Modifier and Type | Class and Description |
|---|---|
static class |
PartTree.OrPart
A part of the parsed source that results from splitting up the resource around Or keywords.
|
| Constructor and Description |
|---|
PartTree(String source,
Class<?> domainClass)
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
getMaxResults()
Return the number of maximal results to return or null if not restricted.
|
Streamable<Part> |
getParts()
|
Streamable<Part> |
getParts(Part.Type type)
|
Sort |
getSort()
Returns the
Sort specification parsed from the source. |
boolean |
hasPredicate()
|
boolean |
isCountProjection()
Returns whether a count projection shall be applied.
|
boolean |
isDelete()
return true if the created
PartTree is meant to be used for delete operation. |
boolean |
isDistinct()
Returns whether we indicate distinct lookup of entities.
|
boolean |
isExistsProjection()
Returns whether an exists projection shall be applied.
|
boolean |
isLimiting()
Return true if the create
PartTree is meant to be used for a query with limited maximal results. |
Iterator<PartTree.OrPart> |
iterator() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitand, and, and, and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream, toList, toSet, toStreamable, toStreamableforEach, spliteratorpublic Iterator<PartTree.OrPart> iterator()
iterator in interface Iterable<PartTree.OrPart>public Sort getSort()
Sort specification parsed from the source.public boolean isDistinct()
public boolean isCountProjection()
public boolean isExistsProjection()
public boolean isDelete()
PartTree is meant to be used for delete operation.public boolean isLimiting()
PartTree is meant to be used for a query with limited maximal results.@Nullable public Integer getMaxResults()
public Streamable<Part> getParts()
Partspublic Streamable<Part> getParts(Part.Type type)
type - public boolean hasPredicate()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.