|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.query.process.QueryResultColumns
@Immutable public class QueryResultColumns
Defines the columns associated with the results of a query. This definition allows the values to be accessed
| Field Summary | |
|---|---|
protected static String |
DEFAULT_SELECTOR_NAME
|
protected static QueryResultColumns |
EMPTY
|
protected static List<Column> |
NO_COLUMNS
|
protected static List<String> |
NO_TYPES
|
| Constructor Summary | |
|---|---|
protected |
QueryResultColumns(boolean includeFullTextSearchScores,
List<? extends Column> columns,
List<String> columnTypes)
Create a new definition for the query results given the supplied columns. |
|
QueryResultColumns(List<? extends Column> columns,
List<String> columnTypes,
boolean includeFullTextSearchScores)
Create a new definition for the query results given the supplied columns. |
| Method Summary | |
|---|---|
protected Integer |
columnIndexForName(String columnName)
|
protected static String |
columnNameFor(Column column,
List<String> columnNames,
Set<Column> columnsWithDuplicateNames,
Collection<String> selectorNames)
|
static QueryResultColumns |
empty()
Get an empty results column definition. |
boolean |
equals(Object obj)
|
protected static Set<Column> |
findColumnsWithSameNames(List<Column> columns)
|
int |
getColumnCount()
Get the number of columns in each tuple. |
int |
getColumnIndexForName(String columnName)
Get the index of the column given the column name. |
int |
getColumnIndexForProperty(String selectorName,
String propertyName)
Get the index of the column given the name of the selector and the property name from where the column should be obtained. |
List<String> |
getColumnNames()
Get the names of the columns. |
List<? extends Column> |
getColumns()
Get the columns. |
List<String> |
getColumnTypes()
Get the type name for each column. |
int |
getFullTextSearchScoreIndexFor(String selectorName)
Get the index of the tuple value containing the full-text search score for the node taken from the named selector. |
int |
getLocationCount()
Get the number of QueryResults.Location objects in each tuple. |
int |
getLocationIndex(String selectorName)
Get the index of a tuple's correct Location object given the name of the selector used in the query. |
int |
getLocationIndexForColumn(int columnIndex)
Get the index of a tuple's correct Location object given the column index. |
int |
getLocationIndexForColumn(String columnName)
Get the index of a tuple's correct Location object given the column index. |
String |
getPropertyNameForColumn(int columnIndex)
Get the name of the property that corresponds to the supplied column in each tuple. |
String |
getPropertyNameForColumnName(String columnName)
Get the name of the property that corresponds to the named column in each tuple. |
String |
getSelectorNameForColumnName(String columnName)
Get the name of the selector that produced the column with the given name. |
List<String> |
getSelectorNames()
Get the names of the selectors that are associated with these results. |
int |
getTupleSize()
Get the size of the tuple arrays. |
List<String> |
getTupleValueNames()
Get the names of the all of the tuple values. |
boolean |
hasFullTextSearchScores()
Determine whether these results include full-text search scores. |
boolean |
hasSelector(String selectorName)
Determine if these results contain values from the selector with the supplied name. |
static boolean |
includeFullTextScores(Constraint constraint)
|
static boolean |
includeFullTextScores(Iterable<Constraint> constraints)
|
boolean |
includes(QueryResults.Columns other)
Determine whether this mapping includes all of the columns (and locations) in the supplied mapping. |
boolean |
isUnionCompatible(QueryResults.Columns other)
Determine whether this column and the other are union-compatible (that is, having the same columns). |
Iterator<Column> |
iterator()
|
QueryResults.Columns |
joinWith(QueryResults.Columns rightColumns)
Obtain a new definition for the query results that is a combination of the these columns and the supplied columns, where the columns from this object appear first, followed by columns from the supplied set. |
QueryResults.Columns |
subSelect(Column... columns)
Obtain a new definition for the query results that can be used to reference the same tuples that use this columns definition, but that defines a subset of the columns in this definition. |
QueryResults.Columns |
subSelect(List<Column> columns)
Obtain a new definition for the query results that can be used to reference the same tuples that use this columns definition, but that defines a subset of the columns in this definition. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final List<Column> NO_COLUMNS
protected static final List<String> NO_TYPES
protected static final QueryResultColumns EMPTY
protected static final String DEFAULT_SELECTOR_NAME
| Constructor Detail |
|---|
public QueryResultColumns(List<? extends Column> columns,
List<String> columnTypes,
boolean includeFullTextSearchScores)
columns - the columns that define the results; should never be modified directlycolumnTypes - the names of the types for each column in columnsincludeFullTextSearchScores - true if room should be made in the tuples for the full-text search scores for each
QueryResults.Location, or false otherwise
protected QueryResultColumns(boolean includeFullTextSearchScores,
List<? extends Column> columns,
List<String> columnTypes)
includeFullTextSearchScores - true if room should be made in the tuples for the full-text search scores for each
QueryResults.Location, or false otherwisecolumns - the columns that define the results; should never be modified directlycolumnTypes - the names of the types for each column in columns| Method Detail |
|---|
public static QueryResultColumns empty()
public static boolean includeFullTextScores(Iterable<Constraint> constraints)
public static boolean includeFullTextScores(Constraint constraint)
public QueryResults.Columns subSelect(List<Column> columns)
QueryResults.Columns
subSelect in interface QueryResults.Columnscolumns - the new columns, which must be a subset of the columns in this definition; may not be null
public QueryResults.Columns subSelect(Column... columns)
QueryResults.Columns
subSelect in interface QueryResults.Columnscolumns - the new columns, which must be a subset of the columns in this definition; may not be null
public QueryResults.Columns joinWith(QueryResults.Columns rightColumns)
QueryResults.Columns
joinWith in interface QueryResults.ColumnsrightColumns - the new columns, which must be a subset of the columns in this definition; may not be null
public List<? extends Column> getColumns()
QueryResults.Columns
getColumns in interface QueryResults.ColumnsQueryResults.Columns.getColumnCount(); never nullpublic Iterator<Column> iterator()
iterator in interface Iterable<Column>public List<String> getColumnNames()
QueryResults.Columns
getColumnNames in interface QueryResults.ColumnsQueryResults.Columns.getColumnCount(); never nullpublic List<String> getColumnTypes()
QueryResults.Columns
getColumnTypes in interface QueryResults.ColumnsQueryResults.Columns.getColumnCount(); never nullpublic int getColumnCount()
QueryResults.Columns
getColumnCount in interface QueryResults.Columnspublic int getLocationCount()
QueryResults.ColumnsQueryResults.Location objects in each tuple.
getLocationCount in interface QueryResults.Columnspublic List<String> getSelectorNames()
QueryResults.ColumnsQueryResults.Location
object for each of the selectors.
getSelectorNames in interface QueryResults.ColumnsQueryResults.Columns.getLocationCount(); never nullpublic int getTupleSize()
QueryResults.Columns
getTupleSize in interface QueryResults.Columnspublic List<String> getTupleValueNames()
QueryResults.Columns
getTupleValueNames in interface QueryResults.Columnspublic int getLocationIndexForColumn(int columnIndex)
QueryResults.Columns
getLocationIndexForColumn in interface QueryResults.ColumnscolumnIndex - the column index
public int getLocationIndexForColumn(String columnName)
QueryResults.Columns
getLocationIndexForColumn in interface QueryResults.ColumnscolumnName - the column name
public int getLocationIndex(String selectorName)
QueryResults.Columns
getLocationIndex in interface QueryResults.ColumnsselectorName - the selector name
public boolean hasSelector(String selectorName)
QueryResults.Columns
hasSelector in interface QueryResults.ColumnsselectorName - the selector name
public String getPropertyNameForColumn(int columnIndex)
QueryResults.Columns
getPropertyNameForColumn in interface QueryResults.ColumnscolumnIndex - the column index
public String getPropertyNameForColumnName(String columnName)
QueryResults.Columns
getPropertyNameForColumnName in interface QueryResults.ColumnscolumnName - the column name
public int getColumnIndexForName(String columnName)
QueryResults.Columns
getColumnIndexForName in interface QueryResults.ColumnscolumnName - the column name
protected Integer columnIndexForName(String columnName)
public String getSelectorNameForColumnName(String columnName)
QueryResults.Columns
getSelectorNameForColumnName in interface QueryResults.ColumnscolumnName - the column name
public int getColumnIndexForProperty(String selectorName,
String propertyName)
QueryResults.Columns
getColumnIndexForProperty in interface QueryResults.ColumnsselectorName - the selector namepropertyName - the name of the property
public int getFullTextSearchScoreIndexFor(String selectorName)
QueryResults.Columns
getFullTextSearchScoreIndexFor in interface QueryResults.ColumnsselectorName - the selector name
Double full-text search score, or -1 if there is no full-text search
score for the named selectorpublic boolean hasFullTextSearchScores()
QueryResults.Columns
hasFullTextSearchScores in interface QueryResults.Columnspublic boolean includes(QueryResults.Columns other)
QueryResults.Columns
includes in interface QueryResults.Columnsother - the other mapping; may not be null
public boolean isUnionCompatible(QueryResults.Columns other)
QueryResults.Columns
isUnionCompatible in interface QueryResults.Columnsother - the other mapping; may not be null
public boolean equals(Object obj)
equals in class Object
protected static String columnNameFor(Column column,
List<String> columnNames,
Set<Column> columnsWithDuplicateNames,
Collection<String> selectorNames)
protected static Set<Column> findColumnsWithSameNames(List<Column> columns)
public String toString()
toString in class ObjectObject.toString()
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||