Top Fields Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class CostEstimateImpl

extends Object
implements CostEstimate
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.compile.CostEstimate, org.apache.derby.iapi.store.access.StoreCostResult
Imports
org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.compile.CostEstimate, org.apache.derby.iapi.store.access.StoreCostResult

Field Summary

Modifier and TypeField and Description
pack-priv double
pack-priv double
pack-priv double

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
CostEstimateImpl(double theCost, double theRowCount, double theSingleScanRowCount)

Method Summary

Modifier and TypeMethod and Description
public CostEstimate
add(CostEstimate
This cost estimate to add this one to.
other
,
CostEstimate
If non-null, put the result here.
retval
)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.add.

Add this cost estimate to another one.

public CostEstimate
cloneMe()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.cloneMe.

Get a copy of this CostEstimate

public double
compare(CostEstimate
The cost estimate to compare this one with
other
)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.compare.

Compare this cost estimate with the given cost estimate.

public CostEstimate
divide(double
The value to divide this CostEstimate by.
divisor
,
CostEstimate
If non-null, put the result here.
retval
)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.divide.

Divide this cost estimate by a scalar, non-dimensional number.

public double
public long
public boolean
isUninitialized()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.isUninitialized.

Return whether or not this CostEstimate is uninitialized.

public CostEstimate
multiply(double
The value to multiply this CostEstimate by.
multiplicand
,
CostEstimate
If non-null, put the result here.
retval
)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.multiply.

Multiply this cost estimate by a scalar, non-dimensional number.

public double
rowCount()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.rowCount.

Get the estimated number of rows returned by the ResultSet that this CostEstimate models.

public void
setCost(double cost, double rowCount, double singleScanRowCount)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.setCost.

Set the cost for this cost estimate.

public void
setCost(CostEstimate other)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.setCost.

Copy the values from the given cost estimate into this one.

public void
public void
public void
setSingleScanRowCount(double singleScanRowCount)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.setSingleScanRowCount.

Set the single scan row count.

pack-priv CostEstimateImpl
setState(double theCost, double theRowCount, CostEstimateImpl retval)

public double
singleScanRowCount()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.singleScanRowCount.

Get the estimated number of rows returned by a single scan of the ResultSet that this CostEstimate models.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

costback to summary
pack-priv double cost
rowCountback to summary
pack-priv double rowCount
singleScanRowCountback to summary
pack-priv double singleScanRowCount

Constructor Detail

CostEstimateImplback to summary
pack-priv CostEstimateImpl()
CostEstimateImplback to summary
pack-priv CostEstimateImpl(double theCost, double theRowCount, double theSingleScanRowCount)

Method Detail

addback to summary
public CostEstimate add(CostEstimate other, CostEstimate retval)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.add.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.add.

Add this cost estimate to another one. This presumes that any row ordering is destroyed.

Parameters
other:CostEstimate

This cost estimate to add this one to.

retval:CostEstimate

If non-null, put the result here.

Returns:CostEstimate

this + other.

See Also
CostEstimate#add
cloneMeback to summary
public CostEstimate cloneMe()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.cloneMe.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.cloneMe.

Get a copy of this CostEstimate

See Also
CostEstimate#cloneMe
compareback to summary
public double compare(CostEstimate other)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.compare.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.compare.

Compare this cost estimate with the given cost estimate.

Parameters
other:CostEstimate

The cost estimate to compare this one with

Returns:double

< 0 if this < other, 0 if this == other, > 0 if this > other

See Also
CostEstimate#compare
divideback to summary
public CostEstimate divide(double divisor, CostEstimate retval)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.divide.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.divide.

Divide this cost estimate by a scalar, non-dimensional number.

Parameters
divisor:double

The value to divide this CostEstimate by.

retval:CostEstimate

If non-null, put the result here.

Returns:CostEstimate

this / divisor

See Also
CostEstimate#divide
getEstimatedCostback to summary
public double getEstimatedCost()

Implements org.apache.derby.iapi.store.access.StoreCostResult.getEstimatedCost.

Doc from org.apache.derby.iapi.store.access.StoreCostResult.getEstimatedCost.

Get the estimated cost.

See Also
StoreCostResult#getEstimatedCost
getEstimatedRowCountback to summary
public long getEstimatedRowCount()

Implements org.apache.derby.iapi.store.access.StoreCostResult.getEstimatedRowCount.

Doc from org.apache.derby.iapi.store.access.StoreCostResult.getEstimatedRowCount.

Get the estimated row count.

See Also
StoreCostResult#getEstimatedRowCount
isUninitializedback to summary
public boolean isUninitialized()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.isUninitialized.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.isUninitialized.

Return whether or not this CostEstimate is uninitialized.

Returns:boolean

Whether or not this CostEstimate is uninitialized.

See Also
CostEstimate#isUninitialized
multiplyback to summary
public CostEstimate multiply(double multiplicand, CostEstimate retval)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.multiply.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.multiply.

Multiply this cost estimate by a scalar, non-dimensional number. This presumes that any row ordering is destroyed.

Parameters
multiplicand:double

The value to multiply this CostEstimate by.

retval:CostEstimate

If non-null, put the result here.

Returns:CostEstimate

this * multiplicand

See Also
CostEstimate#multiply
rowCountback to summary
public double rowCount()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.rowCount.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.rowCount.

Get the estimated number of rows returned by the ResultSet that this CostEstimate models.

See Also
CostEstimate#rowCount
setCostback to summary
public void setCost(double cost, double rowCount, double singleScanRowCount)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.setCost.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.setCost.

Set the cost for this cost estimate.

See Also
CostEstimate#setCost
setCostback to summary
public void setCost(CostEstimate other)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.setCost.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.setCost.

Copy the values from the given cost estimate into this one.

See Also
CostEstimate#setCost
setEstimatedCostback to summary
public void setEstimatedCost(double cost)

Implements org.apache.derby.iapi.store.access.StoreCostResult.setEstimatedCost.

Doc from org.apache.derby.iapi.store.access.StoreCostResult.setEstimatedCost.

Set the estimated cost.

See Also
StoreCostResult#setEstimatedCost
setEstimatedRowCountback to summary
public void setEstimatedRowCount(long count)

Implements org.apache.derby.iapi.store.access.StoreCostResult.setEstimatedRowCount.

Doc from org.apache.derby.iapi.store.access.StoreCostResult.setEstimatedRowCount.

Set the estimated row count.

See Also
StoreCostResult#setEstimatedRowCount
setSingleScanRowCountback to summary
public void setSingleScanRowCount(double singleScanRowCount)

Implements org.apache.derby.iapi.sql.compile.CostEstimate.setSingleScanRowCount.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.setSingleScanRowCount.

Set the single scan row count.

See Also
CostEstimate#setSingleScanRowCount
setStateback to summary
pack-priv CostEstimateImpl setState(double theCost, double theRowCount, CostEstimateImpl retval)
singleScanRowCountback to summary
public double singleScanRowCount()

Implements org.apache.derby.iapi.sql.compile.CostEstimate.singleScanRowCount.

Doc from org.apache.derby.iapi.sql.compile.CostEstimate.singleScanRowCount.

Get the estimated number of rows returned by a single scan of the ResultSet that this CostEstimate models.

See Also
CostEstimate#singleScanRowCount
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object