Package org.apache.sis.storage
Class FeatureQuery.NamedExpression
java.lang.Object
org.apache.sis.storage.FeatureQuery.NamedExpression
- All Implemented Interfaces:
Serializable
- Enclosing class:
- FeatureQuery
An expression to be retrieved by a
Query
, together with the name to assign to it.
In relational database terminology, subset of columns is called projection.
Columns can be given to the FeatureQuery.setProjection(NamedExpression[])
method.- Since:
- 1.1
- Version:
- 1.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal org.opengis.util.GenericName
The name to assign to the expression result, ornull
if unspecified.final Expression<? super AbstractFeature,
?> The literal, value reference or more complex expression to be retrieved by aQuery
.private static final long
For cross-version compatibility. -
Constructor Summary
ConstructorsConstructorDescriptionNamedExpression
(Expression<? super AbstractFeature, ?> expression) Creates a new column with the given expression and no name.NamedExpression
(Expression<? super AbstractFeature, ?> expression, String alias) Creates a new column with the given expression and the given name.NamedExpression
(Expression<? super AbstractFeature, ?> expression, org.opengis.util.GenericName alias) Creates a new column with the given expression and the given name. -
Method Summary
Modifier and TypeMethodDescription(package private) final void
appendTo
(StringBuilder buffer) Appends a string representation of this column in the given buffer.boolean
Compares this column with the given object for equality.int
hashCode()
Returns a hash code value for this column.toString()
Returns a string representation of this column for debugging purpose.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
expression
The literal, value reference or more complex expression to be retrieved by aQuery
. Nevernull
. -
alias
public final org.opengis.util.GenericName aliasThe name to assign to the expression result, ornull
if unspecified.
-
-
Constructor Details
-
NamedExpression
Creates a new column with the given expression and no name.- Parameters:
expression
- the literal, value reference or expression to be retrieved by aQuery
.
-
NamedExpression
public NamedExpression(Expression<? super AbstractFeature, ?> expression, org.opengis.util.GenericName alias) Creates a new column with the given expression and the given name.- Parameters:
expression
- the literal, value reference or expression to be retrieved by aQuery
.alias
- the name to assign to the expression result, ornull
if unspecified.
-
NamedExpression
Creates a new column with the given expression and the given name. This constructor creates aLocalName
from the given string.- Parameters:
expression
- the literal, value reference or expression to be retrieved by aQuery
.alias
- the name to assign to the expression result, ornull
if unspecified.
-
-
Method Details
-
hashCode
public int hashCode()Returns a hash code value for this column. -
equals
Compares this column with the given object for equality. -
toString
Returns a string representation of this column for debugging purpose. -
appendTo
Appends a string representation of this column in the given buffer.
-