public class PartTree extends Object implements Iterable<PartTree.OrPart>
String
into a tree or PartTree.OrPart
s consisting of simple Part
instances in turn.
Takes a domain class as well to validate that each of the Part
s 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 |
---|---|
Iterable<Part> |
getParts()
|
Iterable<Part> |
getParts(Part.Type type)
|
Sort |
getSort()
Returns the
Sort specification parsed from the source or null. |
Boolean |
isCountProjection()
Returns whether a count projection shall be applied.
|
boolean |
isDistinct()
Returns whether we indicate distinct lookup of entities.
|
Iterator<PartTree.OrPart> |
iterator() |
String |
toString() |
public Iterator<PartTree.OrPart> iterator()
iterator
in interface Iterable<PartTree.OrPart>
public Sort getSort()
Sort
specification parsed from the source or null.public boolean isDistinct()
public Boolean isCountProjection()
Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.