Class Point2DColumn
- java.lang.Object
-
- nz.co.gregs.dbvolution.expressions.AnyExpression<B,R,D>
-
- nz.co.gregs.dbvolution.expressions.EqualExpression<B,R,D>
-
- nz.co.gregs.dbvolution.expressions.spatial2D.Spatial2DExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>
-
- nz.co.gregs.dbvolution.expressions.spatial2D.Point2DExpression
-
- nz.co.gregs.dbvolution.columns.Point2DColumn
-
- All Implemented Interfaces:
Serializable
,ColumnProvider
,DBExpression
,ExpressionColumn<DBPoint2D>
,HasSQLString
,AnyComparable<com.vividsolutions.jts.geom.Point,Point2DResult>
,AnyResult<com.vividsolutions.jts.geom.Point>
,EqualComparable<com.vividsolutions.jts.geom.Point,Point2DResult>
,EqualResult<com.vividsolutions.jts.geom.Point>
,ExpressionCanHaveNullValues
,ExpressionHasStandardStringResult
,NullCapableResult<com.vividsolutions.jts.geom.Point>
,Point2DResult
,Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>
,Spatial2DResult<com.vividsolutions.jts.geom.Point>
,SpatialResult<com.vividsolutions.jts.geom.Point>
public class Point2DColumn extends Point2DExpression implements ColumnProvider
Provides a portable representation of a column of Point2D values.Support DBvolution at Patreon
- Author:
- Gregory Graham
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nz.co.gregs.dbvolution.expressions.AnyExpression
AnyExpression.CountAllExpression, AnyExpression.CountDistinctExpression, AnyExpression.CountExpression, AnyExpression.NTileExpression, AnyExpression.PercentageExpression, AnyExpression.RankExpression
-
Nested classes/interfaces inherited from class nz.co.gregs.dbvolution.expressions.EqualExpression
EqualExpression.DBUnaryFunction<B,R extends EqualResult<B>,D extends QueryableDatatype<B>,X extends EqualExpression<B,R,D>>, EqualExpression.ModeSimpleExpression<B,R extends EqualResult<B>,D extends QueryableDatatype<B>,X extends EqualExpression<B,R,D>>, EqualExpression.ModeStrictExpression<B,R extends EqualResult<B>,D extends QueryableDatatype<B>,X extends EqualExpression<B,R,D>>
-
Nested classes/interfaces inherited from class nz.co.gregs.dbvolution.expressions.spatial2D.Point2DExpression
Point2DExpression.BoundingBoxExpression, Point2DExpression.DistanceToExpression, Point2DExpression.GetXExpression, Point2DExpression.GetYExpression, Point2DExpression.HasMagnitudeExpression, Point2DExpression.IsExpression, Point2DExpression.MagnitudeExpression, Point2DExpression.MeasurableDimensionsExpression, Point2DExpression.SpatialDimensionsExpression
-
-
Constructor Summary
Constructors Constructor Description Point2DColumn(RowDefinition row, com.vividsolutions.jts.geom.Point field)
Point2DColumn(RowDefinition row, DBPoint2D field)
Creates a portable reference to the column represented by the field of the row.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point2DColumn
copy()
A Complete Copy Of This DBValue.boolean
equals(Object other)
AbstractColumn
getColumn()
Returns the AbstractColumn from this ColumnProvider.SortProvider.Column
getSortProvider()
Provides the sorting for this column as defined by the methodsQueryableDatatype.setSortOrder(java.lang.Boolean)
,QueryableDatatype.setSortOrderAscending()
, andQueryableDatatype.setSortOrderDescending()
on the QDT.Set<DBRow>
getTablesInvolved()
Returns a Set of the DBRow instances involved in this expression.int
hashCode()
boolean
isAggregator()
Returns TRUE if this expression is an Aggregator like SUM() or LEAST().boolean
isPurelyFunctional()
Indicates whether or not the expression includes table columns.void
setUseTableAlias(boolean useTableAlias)
Indicates whether the ColumnProvider should use the table alias during query creation.String
toSQLString(DBDefinition db)
Produces the snippet provided by this class.-
Methods inherited from interface nz.co.gregs.dbvolution.results.AnyComparable
isNotNull, isNull
-
Methods inherited from class nz.co.gregs.dbvolution.expressions.AnyExpression
ascending, asResult, count, countAll, countDistinctValues, countNotNull, createSQLForFromClause, createSQLForGroupByClause, denseRank, descending, getIncludesNull, getInnerResult, highestFirst, highestLast, isComplexExpression, isNullSafetyTerminator, isWindowingFunction, lowestFirst, lowestLast, nTile, nTile, nTile, nullBoolean, nullDate, nullDateRepeat, nullDuration, nullInstant, nullInteger, nullLine2D, nullLineSegment2D, nullLocalDate, nullLocalDateTime, nullMultiPoint2D, nullNumber, nullPoint2D, nullPolygon2D, nullString, percentageRank, rank, rowNumber, runningCount, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value
-
Methods inherited from interface nz.co.gregs.dbvolution.columns.ColumnProvider
ascending, descending
-
Methods inherited from interface nz.co.gregs.dbvolution.expressions.DBExpression
createSQLForFromClause, createSQLForGroupByClause, getQueryableDatatypeForExpressionValue, isComplexExpression, isWindowingFunction
-
Methods inherited from class nz.co.gregs.dbvolution.expressions.EqualExpression
countIf, is, isNot
-
Methods inherited from interface nz.co.gregs.dbvolution.results.ExpressionCanHaveNullValues
getIncludesNull
-
Methods inherited from interface nz.co.gregs.dbvolution.expressions.ExpressionColumn
toExpressionColumn
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class nz.co.gregs.dbvolution.expressions.spatial2D.Point2DExpression
asExpressionColumn, boundingBox, distanceTo, expression, expression, expression, expression, expression, expression, expression, expression, getQueryableDatatypeForExpressionValue, getX, getY, hasMagnitude, is, is, isNot, isNot, magnitude, maxX, maxY, measurableDimensions, minX, minY, modeSimple, modeStrict, nullExpression, spatialDimensions, stringResult, toWKTFormat, value, value, value, value, value, value, value
-
-
-
-
Constructor Detail
-
Point2DColumn
public Point2DColumn(RowDefinition row, DBPoint2D field)
Creates a portable reference to the column represented by the field of the row.- Parameters:
row
- the table defining object the contains the fieldfield
- the field that defines the column.
-
Point2DColumn
public Point2DColumn(RowDefinition row, com.vividsolutions.jts.geom.Point field)
-
-
Method Detail
-
getColumn
public AbstractColumn getColumn()
Description copied from interface:ColumnProvider
Returns the AbstractColumn from this ColumnProvider.Support DBvolution at Patreon
- Specified by:
getColumn
in interfaceColumnProvider
- Returns:
- the column that this provider supplies.
-
setUseTableAlias
public void setUseTableAlias(boolean useTableAlias)
Description copied from interface:ColumnProvider
Indicates whether the ColumnProvider should use the table alias during query creation.the standard implementation is
this.column.setUseTableAlias(useTableAlias);
and passes the boolean along to the underlying AbstractColumn- Specified by:
setUseTableAlias
in interfaceColumnProvider
- Parameters:
useTableAlias
- true or false
-
toSQLString
public String toSQLString(DBDefinition db)
Description copied from interface:HasSQLString
Produces the snippet provided by this class.This is only used internally.
If you are extending DBvolution and adding a new function this is the place to format the information for use in SQL. A DBDefinition instance is provided to supply context and so your SQL can used on multiple database engines.
- Specified by:
toSQLString
in interfaceHasSQLString
- Overrides:
toSQLString
in classAnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>
- Parameters:
db
- the target databaseSupport DBvolution at Patreon
- Returns:
- the DBValue formatted as a SQL snippet
-
getTablesInvolved
public Set<DBRow> getTablesInvolved()
Description copied from interface:DBExpression
Returns a Set of the DBRow instances involved in this expression.Used by QueryGraph to plot the connections between tables and avoid cartesian joins.
Support DBvolution at Patreon
- Specified by:
getTablesInvolved
in interfaceDBExpression
- Overrides:
getTablesInvolved
in classAnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>
- Returns:
- a set of DBRow instances involved in this DBExpression.
-
isPurelyFunctional
public boolean isPurelyFunctional()
Description copied from interface:DBExpression
Indicates whether or not the expression includes table columns.Purely functional expressions use only in-built functions or literal values to produce results and do not require data from tables.
Some databases, notably MS SQLServer, can not group purely functional expressions.
Support DBvolution at Patreon
- Specified by:
isPurelyFunctional
in interfaceDBExpression
- Overrides:
isPurelyFunctional
in classAnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>
- Returns:
- TRUE if the expression does not access table data, otherwise FALSE.
-
isAggregator
public boolean isAggregator()
Description copied from interface:DBExpression
Returns TRUE if this expression is an Aggregator like SUM() or LEAST().Subclasses must implement this method returning TRUE if the expression will combine the results of several rows to produce a result. If the expression relies on subexpressions, then the isAggregator method must return TRUE if the subexpressions include an aggregator.
Aggregators collect several rows together to produce a single result. Examples are MAX, MIN, and AVERAGE.
They are only appropriate in the SELECT clause and generally require the GROUP BY clause to be useful.
Aggregators are used with
DBReport
. Aggregator expressions are included in the SELECT clause but excluded from the GROUP BY clause.Support DBvolution at Patreon
- Specified by:
isAggregator
in interfaceDBExpression
- Overrides:
isAggregator
in classAnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>
- Returns:
- TRUE if this DBExpression represents an aggregating functions
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classPoint2DExpression
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPoint2DExpression
-
copy
public Point2DColumn copy()
Description copied from interface:DBExpression
A Complete Copy Of This DBValue.Immutability in DBvolution is maintain by internally copying objects.
This method enables immutability by performing a deep copy of the object.
Singletons may return themselves but all other objects must return a new instance with copies of all mutable fields.
Support DBvolution at Patreon
- Specified by:
copy
in interfaceDBExpression
- Overrides:
copy
in classPoint2DExpression
- Returns:
- a copy of this
DBValue
-
getSortProvider
public SortProvider.Column getSortProvider()
Description copied from interface:ColumnProvider
Provides the sorting for this column as defined by the methodsQueryableDatatype.setSortOrder(java.lang.Boolean)
,QueryableDatatype.setSortOrderAscending()
, andQueryableDatatype.setSortOrderDescending()
on the QDT.At the time of querying the sort order defined on the original QDT field provided is add to the query, with ASCENDING being used as the default ordering.
To be certain of the ordering use the
AnyExpression.ascending()
andAnyExpression.descending()
methods.- Specified by:
getSortProvider
in interfaceColumnProvider
- Returns:
- a SortProvider configured to use the sorting defined on original QDT or ASCENDING.
-
-