public class SelectionCollector extends Object implements Selection
Select,
Type| Modifier and Type | Field and Description |
|---|---|
protected boolean |
onlyDeclaredProperties
Whether to collect only declared properties for a type, otherwise indicates
to collect all properties for a given type and all its base types
|
protected boolean |
onlySingularProperties
Whether to collect only singular reference properties and follow paths
composed of only singular properties.
|
protected commonj.sdo.Type |
rootType |
| Constructor and Description |
|---|
SelectionCollector(Select select,
PlasmaType rootType) |
SelectionCollector(Select select,
PlasmaType rootType,
boolean onlySingularProperties) |
SelectionCollector(Select select,
Where where,
OrderBy orderBy,
GroupBy groupBy,
Having having,
PlasmaType rootType) |
SelectionCollector(Select select,
Where where,
OrderBy orderBy,
GroupBy groupBy,
Having having,
PlasmaType rootType,
boolean onlySingularProperties) |
SelectionCollector(Select select,
Where where,
OrderBy orderBy,
PlasmaType rootType) |
SelectionCollector(Select select,
Where where,
OrderBy orderBy,
PlasmaType rootType,
boolean onlySingularProperties) |
SelectionCollector(Select select,
Where where,
PlasmaType rootType) |
SelectionCollector(Select select,
Where where,
PlasmaType rootType,
boolean onlySingularProperties) |
SelectionCollector(Where where,
PlasmaType rootType) |
SelectionCollector(Where where,
PlasmaType rootType,
boolean onlySingularProperties) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addInheritedProperty(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map) |
protected void |
addInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map) |
protected void |
addInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map) |
protected void |
addPredicate(commonj.sdo.Property property,
Integer level,
Where predicate,
Map<commonj.sdo.Property,Map<Integer,Where>> map) |
protected void |
addPredicate(commonj.sdo.Property property,
commonj.sdo.Property edge,
Where predicate,
Map<commonj.sdo.Property,Map<commonj.sdo.Property,Where>> map) |
protected void |
addProperty(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map) |
protected void |
addProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map) |
protected void |
addProperty(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map) |
List<commonj.sdo.Type> |
addProperty(commonj.sdo.Type rootType,
String path)
Adds the given given property to the selection for the given graph root
type and returns any types collected during traversal of the property path.
|
String |
dumpInheritedProperties() |
String |
dumpProperties() |
protected commonj.sdo.Property[] |
findProperties(commonj.sdo.Type type,
AbstractProperty abstractProperty)
A convenience method returning an array of names for the given property
whether a wildcard property or not.
|
protected String[] |
findPropertyNames(commonj.sdo.Type type,
AbstractProperty abstractProperty)
A convenience method returning an array of names for the given property
whether a wildcard property or not.
|
List<FunctionPath> |
getAggregateFunctions() |
List<Function> |
getFunctions(commonj.sdo.Property property)
Returns the functions for the given property or empty list if the given
property has no functions.
|
List<Function> |
getFunctions(commonj.sdo.Property property,
int level)
Returns the functions for the given property for the given traversal level
or graph depth, or empty list if the given property has no functions.
|
Set<commonj.sdo.Property> |
getInheritedProperties(commonj.sdo.Type type)
Returns the unique set of inherited data and reference properties collected
for the given type, and any base types of the given type, irrespective of
the (query) graph level.
|
Set<commonj.sdo.Property> |
getInheritedProperties(commonj.sdo.Type type,
int level)
Returns the unique set of inherited data and reference properties collected
for the given type, and any base types of the given type, for the given
(query) graph level.
|
Set<commonj.sdo.Property> |
getInheritedProperties(commonj.sdo.Type type,
commonj.sdo.Property sourceProperty)
Returns the unique set of inherited data and reference properties collected
for the given Type for the given (query) graph edge source property.
|
Set<commonj.sdo.Property> |
getInheritedProperties(commonj.sdo.Type type,
commonj.sdo.Property sourceProperty,
int level)
Returns the unique set of inherited data and reference properties collected
for the given Type for the given (query) graph edge source property at the
given traversal level or graph depth.
|
List<commonj.sdo.Type> |
getInheritedTypes()
Returns all selected types and as well as types which specialize or inherit
from the selected types.
|
Where |
getPredicate(commonj.sdo.Property property)
Returns the predicate for the given property or null if the given property
has no predicates.
|
Where |
getPredicate(commonj.sdo.Property property,
int level)
Returns the predicate , if exists, collected for the given property for the
given traversal level or graph depth.
|
Where |
getPredicate(commonj.sdo.Property property,
commonj.sdo.Property sourceProperty)
Returns the predicate, if exists, collected for the given property and for
the given (query) graph edge source property.
|
Map<commonj.sdo.Property,Where> |
getPredicateMap()
Deprecated.
|
Set<commonj.sdo.Property> |
getProperties(commonj.sdo.Type type)
Returns the unique set of data and reference properties collected for the
given type irrespective of the (query) graph level, or source graph edge
type.
|
Set<commonj.sdo.Property> |
getProperties(commonj.sdo.Type type,
int level)
Returns the unique set of data and reference properties collected for the
given Type for the given (query) graph level.
|
Set<commonj.sdo.Property> |
getProperties(commonj.sdo.Type type,
commonj.sdo.Property sourceProperty)
Returns the unique set of data and reference properties collected for the
given Type for the given (query) graph edge source property.
|
Set<commonj.sdo.Property> |
getProperties(commonj.sdo.Type type,
commonj.sdo.Property sourceProperty,
int level)
Returns the unique set of data and reference properties collected for the
given Type for the given (query) graph edge source property at the given
traversal level or graph depth.
|
Map<Path,List<commonj.sdo.Property>> |
getPropertyPaths() |
Set<commonj.sdo.Property> |
getSingularProperties(commonj.sdo.Type type)
Returns the unique set of singular data and reference properties collected
for the given type irrespective of the (query) graph level, or source graph
edge type.
|
List<commonj.sdo.Type> |
getTypes()
Returns all selected types.
|
boolean |
hasAggregateFunctions()
Returns true if any aggregate functions are found in the selection
|
boolean |
hasInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property property)
Returns true if the given type is found in the inherited type selection and
if the given property is found in the property selection for the given
type.
|
boolean |
hasInheritedType(commonj.sdo.Type type)
Returns true if the given type is found in the inherited type selection.
|
boolean |
hasPredicates()
(non-Javadoc)
|
boolean |
hasProperty(commonj.sdo.Type type,
commonj.sdo.Property property)
Returns true if the given type is found in the type selection and if the
given property is found in the property selection for the given type.
|
boolean |
hasType(commonj.sdo.Type type)
Returns true if the given type is found in the type selection.
|
boolean |
isOnlyDeclaredProperties()
Returns whether to collect only declared properties for a type.
|
boolean |
isOnlySingularProperties()
Returns whether to collect only singular properties and follow paths
composed of only singular properties.
|
protected boolean |
isSingularPath(Path path,
commonj.sdo.Type currType,
AbstractPathElement currPathElement,
int curPathElementIndex,
AbstractProperty abstractProperty)
Recursively traverses the given path checking every path element and
determines if the entire path is composed of singular properties.
|
protected boolean |
isSingularPath(Path path,
commonj.sdo.Type rootType,
AbstractProperty abstractProperty)
Recursively traverses the given path checking every path element and
determines if the entire path is composed of singular properties.
|
protected void |
mapFunctions(commonj.sdo.Property prop,
Integer level,
List<Function> functions,
Map<commonj.sdo.Property,Map<Integer,List<Function>>> map) |
protected void |
mapFunctions(commonj.sdo.Property prop,
List<Function> functions,
Map<commonj.sdo.Property,List<Function>> map) |
protected void |
mapFunctions(commonj.sdo.Property prop,
Path path,
List<Function> functions,
Map<commonj.sdo.Property,Map<Path,List<Function>>> map) |
protected void |
mapInheritedProperties(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map) |
protected void |
mapInheritedProperties(commonj.sdo.Type type,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map) |
protected void |
mapInheritedProperties(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map) |
protected void |
mapInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,List<String>> map) |
protected void |
mapInheritedPropertyNames(commonj.sdo.Type type,
String[] names,
Map<commonj.sdo.Type,List<String>> map) |
protected void |
mapProperties(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map) |
protected void |
mapProperties(commonj.sdo.Type type,
Path path,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<Path,Set<commonj.sdo.Property>>> map) |
protected void |
mapProperties(commonj.sdo.Type type,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map) |
protected void |
mapProperties(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map) |
protected void |
mapProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,List<String>> map) |
protected void |
mapPropertyNames(commonj.sdo.Type type,
String[] names,
Map<commonj.sdo.Type,List<String>> map) |
void |
setOnlyDeclaredProperties(boolean onlyDeclaredProperties)
Sets whether to collect only declared properties for a type.
|
void |
setOnlySingularProperties(boolean onlySingularProperties)
Sets whether to collect only singular properties and follow paths composed
of only singular properties.
|
protected commonj.sdo.Type rootType
protected boolean onlySingularProperties
protected boolean onlyDeclaredProperties
public SelectionCollector(Select select, PlasmaType rootType)
public SelectionCollector(Select select, PlasmaType rootType, boolean onlySingularProperties)
public SelectionCollector(Select select, Where where, PlasmaType rootType)
public SelectionCollector(Select select, Where where, PlasmaType rootType, boolean onlySingularProperties)
public SelectionCollector(Select select, Where where, OrderBy orderBy, PlasmaType rootType)
public SelectionCollector(Select select, Where where, OrderBy orderBy, PlasmaType rootType, boolean onlySingularProperties)
public SelectionCollector(Select select, Where where, OrderBy orderBy, GroupBy groupBy, Having having, PlasmaType rootType)
public SelectionCollector(Select select, Where where, OrderBy orderBy, GroupBy groupBy, Having having, PlasmaType rootType, boolean onlySingularProperties)
public SelectionCollector(Where where, PlasmaType rootType)
public SelectionCollector(Where where, PlasmaType rootType, boolean onlySingularProperties)
@Deprecated public Map<commonj.sdo.Property,Where> getPredicateMap()
public boolean hasPredicates()
hasPredicates in interface Selectionpublic Where getPredicate(commonj.sdo.Property property)
SelectiongetPredicate in interface Selectionproperty - the propertypublic Set<commonj.sdo.Property> getSingularProperties(commonj.sdo.Type type)
SelectiongetSingularProperties in interface Selectiontype - the typepublic Set<commonj.sdo.Property> getProperties(commonj.sdo.Type type)
SelectiongetProperties in interface Selectiontype - the typepublic Set<commonj.sdo.Property> getInheritedProperties(commonj.sdo.Type type)
SelectiongetInheritedProperties in interface Selectiontype - the typepublic Set<commonj.sdo.Property> getInheritedProperties(commonj.sdo.Type type, commonj.sdo.Property sourceProperty)
SelectiongetInheritedProperties in interface Selectiontype - the type (query) graph edge source propertysourceProperty - thepublic Set<commonj.sdo.Property> getInheritedProperties(commonj.sdo.Type type, int level)
SelectiongetInheritedProperties in interface Selectiontype - the typelevel - the specific graph level where the properties were specified in
the selectionpublic Set<commonj.sdo.Property> getInheritedProperties(commonj.sdo.Type type, commonj.sdo.Property sourceProperty, int level)
SelectiongetInheritedProperties in interface Selectiontype - the type (query) graph edge source propertysourceProperty - thelevel - the traversal level or graph depthpublic List<commonj.sdo.Type> getTypes()
Selectionpublic boolean hasType(commonj.sdo.Type type)
Selectionpublic List<commonj.sdo.Type> getInheritedTypes()
SelectiongetInheritedTypes in interface Selectionpublic boolean hasInheritedType(commonj.sdo.Type type)
SelectionhasInheritedType in interface Selectiontype - the typepublic boolean hasProperty(commonj.sdo.Type type,
commonj.sdo.Property property)
SelectionhasProperty in interface Selectiontype - the typeproperty - the propertypublic List<commonj.sdo.Type> addProperty(commonj.sdo.Type rootType, String path)
SelectionaddProperty in interface SelectionrootType - the graph root typepath - the SDO XPath specifying a path from the given root type to a
target or endpoint propertypublic boolean hasInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property property)
SelectionhasInheritedProperty in interface Selectiontype - the typeproperty - the propertypublic Set<commonj.sdo.Property> getProperties(commonj.sdo.Type type, int level)
SelectiongetProperties in interface Selectiontype - the typelevel - the specific graph level where the properties were specified in
the selectionpublic Set<commonj.sdo.Property> getProperties(commonj.sdo.Type type, commonj.sdo.Property sourceProperty)
SelectiongetProperties in interface Selectiontype - the type (query) graph edge source propertysourceProperty - the (query) graph edge source propertypublic Set<commonj.sdo.Property> getProperties(commonj.sdo.Type type, commonj.sdo.Property sourceProperty, int level)
SelectiongetProperties in interface Selectiontype - the type (query) graph edge source propertysourceProperty - the (query) graph edge source propertylevel - the traversal level or graph depthpublic Where getPredicate(commonj.sdo.Property property, commonj.sdo.Property sourceProperty)
SelectiongetPredicate in interface Selectionproperty - the source propertysourceProperty - the (query) graph edge source propertypublic Where getPredicate(commonj.sdo.Property property, int level)
SelectiongetPredicate in interface Selectionlevel - the traversal level or graph depthpublic Map<Path,List<commonj.sdo.Property>> getPropertyPaths()
getPropertyPaths in interface Selectionpublic List<Function> getFunctions(commonj.sdo.Property property)
SelectiongetFunctions in interface Selectionproperty - the propertypublic boolean hasAggregateFunctions()
SelectionhasAggregateFunctions in interface Selectionpublic List<Function> getFunctions(commonj.sdo.Property property, int level)
SelectiongetFunctions in interface Selectionproperty - the propertylevel - the traversal level or graph depthpublic List<FunctionPath> getAggregateFunctions()
getAggregateFunctions in interface Selectionpublic String dumpProperties()
public String dumpInheritedProperties()
public boolean isOnlySingularProperties()
public void setOnlySingularProperties(boolean onlySingularProperties)
public boolean isOnlyDeclaredProperties()
public void setOnlyDeclaredProperties(boolean onlyDeclaredProperties)
protected void mapProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,List<String>> map)
protected void addProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map)
protected void addProperty(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map)
protected void addPredicate(commonj.sdo.Property property,
Integer level,
Where predicate,
Map<commonj.sdo.Property,Map<Integer,Where>> map)
protected void addProperty(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map)
protected void addPredicate(commonj.sdo.Property property,
commonj.sdo.Property edge,
Where predicate,
Map<commonj.sdo.Property,Map<commonj.sdo.Property,Where>> map)
protected void mapInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,List<String>> map)
protected void addInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map)
protected void addInheritedProperty(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map)
protected void addInheritedProperty(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property property,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map)
protected void mapPropertyNames(commonj.sdo.Type type,
String[] names,
Map<commonj.sdo.Type,List<String>> map)
protected void mapProperties(commonj.sdo.Type type,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map)
protected void mapFunctions(commonj.sdo.Property prop,
List<Function> functions,
Map<commonj.sdo.Property,List<Function>> map)
protected void mapProperties(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map)
protected void mapProperties(commonj.sdo.Type type,
Path path,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<Path,Set<commonj.sdo.Property>>> map)
protected void mapFunctions(commonj.sdo.Property prop,
Integer level,
List<Function> functions,
Map<commonj.sdo.Property,Map<Integer,List<Function>>> map)
protected void mapFunctions(commonj.sdo.Property prop,
Path path,
List<Function> functions,
Map<commonj.sdo.Property,Map<Path,List<Function>>> map)
protected void mapProperties(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map)
protected void mapInheritedPropertyNames(commonj.sdo.Type type,
String[] names,
Map<commonj.sdo.Type,List<String>> map)
protected void mapInheritedProperties(commonj.sdo.Type type,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Set<commonj.sdo.Property>> map)
protected void mapInheritedProperties(commonj.sdo.Type type,
Integer level,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<Integer,Set<commonj.sdo.Property>>> map)
protected void mapInheritedProperties(commonj.sdo.Type type,
commonj.sdo.Property edge,
commonj.sdo.Property[] props,
Map<commonj.sdo.Type,Map<commonj.sdo.Property,Set<commonj.sdo.Property>>> map)
protected String[] findPropertyNames(commonj.sdo.Type type, AbstractProperty abstractProperty)
type - the typeabstractProperty - the propertyprotected commonj.sdo.Property[] findProperties(commonj.sdo.Type type,
AbstractProperty abstractProperty)
type - the typeabstractProperty - the propertyprotected boolean isSingularPath(Path path, commonj.sdo.Type rootType, AbstractProperty abstractProperty)
path - the pathrootType - the root typeabstractProperty - protected boolean isSingularPath(Path path, commonj.sdo.Type currType, AbstractPathElement currPathElement, int curPathElementIndex, AbstractProperty abstractProperty)
path - the pathcurrType - the current typecurrPathElement - the current path elementcurPathElementIndex - the current path element indexabstractProperty - the propertyCopyright © 2021. All rights reserved.