Package gov.usgs.earthquake.indexer
Class ProductIndexQuery
- java.lang.Object
-
- gov.usgs.earthquake.indexer.ProductIndexQuery
-
- All Implemented Interfaces:
java.lang.Comparable<ProductIndexQuery>
public class ProductIndexQuery extends java.lang.Object implements java.lang.Comparable<ProductIndexQuery>
Criteria for finding events. All properties are inclusive. When a property is null, it means any value. Expected combinations: 1) find events based on event parameters event time event latitude event longitude 2) find previously received update of product product source product type product code 3) find related products/events product ids 4) find related products/events event ids
-
-
Field Summary
Fields Modifier and Type Field Description static gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes
RESULT_TYPE_ALL
ResultType for RESULT_TYPE_ALLstatic gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes
RESULT_TYPE_CURRENT
ResultType for RESULT_TYPE_CURRENTstatic gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes
RESULT_TYPE_SUPERSEDED
ResultType for RESULT_TYPE_SUPERSEDEDstatic gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes
SEARCH_EVENT_PREFERRED
EventSearchType for SEARCH_EVENT_PREFERREDstatic gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes
SEARCH_EVENT_PRODUCTS
EventSearchType for SEARCH_EVENT_PRODCUTS
-
Constructor Summary
Constructors Constructor Description ProductIndexQuery()
Construct a new ProductIndexQuery.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends java.lang.Comparable<T>>
intcompare(T o1, T o2)
Compare functionint
compareTo(ProductIndexQuery that)
boolean
equals(java.lang.Object that)
gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes
getEventSearchType()
java.lang.String
getEventSource()
java.lang.String
getEventSourceCode()
java.lang.Integer
getLimit()
java.math.BigDecimal
getMaxEventDepth()
java.math.BigDecimal
getMaxEventLatitude()
java.math.BigDecimal
getMaxEventLongitude()
java.math.BigDecimal
getMaxEventMagnitude()
java.util.Date
getMaxEventTime()
java.util.Date
getMaxProductUpdateTime()
java.math.BigDecimal
getMinEventDepth()
java.math.BigDecimal
getMinEventLatitude()
java.math.BigDecimal
getMinEventLongitude()
java.math.BigDecimal
getMinEventMagnitude()
java.util.Date
getMinEventTime()
java.lang.Long
getMinProductIndexId()
java.util.Date
getMinProductUpdateTime()
java.lang.String
getOrderBy()
java.lang.String
getProductCode()
java.util.List<ProductId>
getProductIds()
java.lang.String
getProductSource()
java.lang.String
getProductStatus()
java.lang.String
getProductType()
java.lang.String
getProductVersion()
gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes
getResultType()
void
log(java.util.logging.Logger logger)
Log functionvoid
setEventSearchType(gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes eventSearchType)
void
setEventSource(java.lang.String eventSource)
void
setEventSourceCode(java.lang.String eventSourceCode)
void
setLimit(java.lang.Integer limit)
void
setMaxEventDepth(java.math.BigDecimal maxEventDepth)
void
setMaxEventLatitude(java.math.BigDecimal maxEventLatitude)
void
setMaxEventLongitude(java.math.BigDecimal maxEventLongitude)
void
setMaxEventMagnitude(java.math.BigDecimal maxEventMagnitude)
void
setMaxEventTime(java.util.Date maxEventTime)
void
setMaxProductUpdateTime(java.util.Date maxProductUpdateTime)
void
setMinEventDepth(java.math.BigDecimal minEventDepth)
void
setMinEventLatitude(java.math.BigDecimal minEventLatitude)
void
setMinEventLongitude(java.math.BigDecimal minEventLongitude)
void
setMinEventMagnitude(java.math.BigDecimal minEventMagnitude)
void
setMinEventTime(java.util.Date minEventTime)
void
setMinProductIndexId(java.lang.Long minProductIndexId)
void
setMinProductUpdateTime(java.util.Date minProductUpdateTime)
void
setOrderBy(java.lang.String orderBy)
void
setProductCode(java.lang.String productCode)
void
setProductIds(java.util.List<ProductId> productIds)
void
setProductSource(java.lang.String productSource)
void
setProductStatus(java.lang.String productStatus)
void
setProductType(java.lang.String productType)
void
setProductVersion(java.lang.String productVersion)
void
setResultType(gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes resultType)
-
-
-
Field Detail
-
SEARCH_EVENT_PREFERRED
public static gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes SEARCH_EVENT_PREFERRED
EventSearchType for SEARCH_EVENT_PREFERRED
-
SEARCH_EVENT_PRODUCTS
public static gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes SEARCH_EVENT_PRODUCTS
EventSearchType for SEARCH_EVENT_PRODCUTS
-
RESULT_TYPE_CURRENT
public static gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes RESULT_TYPE_CURRENT
ResultType for RESULT_TYPE_CURRENT
-
RESULT_TYPE_SUPERSEDED
public static gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes RESULT_TYPE_SUPERSEDED
ResultType for RESULT_TYPE_SUPERSEDED
-
RESULT_TYPE_ALL
public static gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes RESULT_TYPE_ALL
ResultType for RESULT_TYPE_ALL
-
-
Method Detail
-
setEventSearchType
public void setEventSearchType(gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes eventSearchType)
- Parameters:
eventSearchType
- to set
-
getEventSearchType
public gov.usgs.earthquake.indexer.ProductIndexQuery.EventSearchTypes getEventSearchType()
- Returns:
- eventSearchType
-
setResultType
public void setResultType(gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes resultType)
- Parameters:
resultType
- to set
-
getResultType
public gov.usgs.earthquake.indexer.ProductIndexQuery.ResultTypes getResultType()
- Returns:
- resultType
-
setEventSource
public void setEventSource(java.lang.String eventSource)
- Parameters:
eventSource
- to set
-
getEventSource
public java.lang.String getEventSource()
- Returns:
- eventSource
-
setEventSourceCode
public void setEventSourceCode(java.lang.String eventSourceCode)
- Parameters:
eventSourceCode
- to set
-
getEventSourceCode
public java.lang.String getEventSourceCode()
- Returns:
- eventSourceCode
-
getMinEventTime
public java.util.Date getMinEventTime()
- Returns:
- minEventTime
-
setMinEventTime
public void setMinEventTime(java.util.Date minEventTime)
- Parameters:
minEventTime
- to set
-
getMaxEventTime
public java.util.Date getMaxEventTime()
- Returns:
- maxEventTime
-
setMaxEventTime
public void setMaxEventTime(java.util.Date maxEventTime)
- Parameters:
maxEventTime
- to set
-
getMinEventLatitude
public java.math.BigDecimal getMinEventLatitude()
- Returns:
- minEventLatitude
-
setMinEventLatitude
public void setMinEventLatitude(java.math.BigDecimal minEventLatitude)
- Parameters:
minEventLatitude
- to set
-
getMaxEventLatitude
public java.math.BigDecimal getMaxEventLatitude()
- Returns:
- maxEventLatitude
-
setMaxEventLatitude
public void setMaxEventLatitude(java.math.BigDecimal maxEventLatitude)
- Parameters:
maxEventLatitude
- to set
-
getMinEventLongitude
public java.math.BigDecimal getMinEventLongitude()
- Returns:
- minEventLongitude
-
setMinEventLongitude
public void setMinEventLongitude(java.math.BigDecimal minEventLongitude)
- Parameters:
minEventLongitude
- to set
-
getMaxEventLongitude
public java.math.BigDecimal getMaxEventLongitude()
- Returns:
- maxEventLongitude
-
setMaxEventLongitude
public void setMaxEventLongitude(java.math.BigDecimal maxEventLongitude)
- Parameters:
maxEventLongitude
- to set
-
getMinEventDepth
public java.math.BigDecimal getMinEventDepth()
- Returns:
- minEventDepth
-
setMinEventDepth
public void setMinEventDepth(java.math.BigDecimal minEventDepth)
- Parameters:
minEventDepth
- to set
-
getMaxEventDepth
public java.math.BigDecimal getMaxEventDepth()
- Returns:
- maxEventDepth
-
setMaxEventDepth
public void setMaxEventDepth(java.math.BigDecimal maxEventDepth)
- Parameters:
maxEventDepth
- to set
-
getMinEventMagnitude
public java.math.BigDecimal getMinEventMagnitude()
- Returns:
- minEventMagnitude
-
setMinEventMagnitude
public void setMinEventMagnitude(java.math.BigDecimal minEventMagnitude)
- Parameters:
minEventMagnitude
- to set
-
getMaxEventMagnitude
public java.math.BigDecimal getMaxEventMagnitude()
- Returns:
- maxEventMagnitude
-
setMaxEventMagnitude
public void setMaxEventMagnitude(java.math.BigDecimal maxEventMagnitude)
- Parameters:
maxEventMagnitude
- to set
-
getProductIds
public java.util.List<ProductId> getProductIds()
- Returns:
- list of product Ids
-
setProductIds
public void setProductIds(java.util.List<ProductId> productIds)
- Parameters:
productIds
- list to set
-
getMinProductUpdateTime
public java.util.Date getMinProductUpdateTime()
- Returns:
- minProductUpdateTime
-
setMinProductUpdateTime
public void setMinProductUpdateTime(java.util.Date minProductUpdateTime)
- Parameters:
minProductUpdateTime
- to set
-
getMaxProductUpdateTime
public java.util.Date getMaxProductUpdateTime()
- Returns:
- maxProductUpdateTime
-
setMaxProductUpdateTime
public void setMaxProductUpdateTime(java.util.Date maxProductUpdateTime)
- Parameters:
maxProductUpdateTime
- to set
-
getProductSource
public java.lang.String getProductSource()
- Returns:
- productSource
-
setProductSource
public void setProductSource(java.lang.String productSource)
- Parameters:
productSource
- to set
-
getProductType
public java.lang.String getProductType()
- Returns:
- productType
-
setProductType
public void setProductType(java.lang.String productType)
- Parameters:
productType
- to set
-
getProductCode
public java.lang.String getProductCode()
- Returns:
- productCode
-
setProductCode
public void setProductCode(java.lang.String productCode)
- Parameters:
productCode
- to set
-
setProductVersion
public void setProductVersion(java.lang.String productVersion)
- Parameters:
productVersion
- to set
-
getProductVersion
public java.lang.String getProductVersion()
- Returns:
- productVersion
-
setProductStatus
public void setProductStatus(java.lang.String productStatus)
- Parameters:
productStatus
- to set
-
getProductStatus
public java.lang.String getProductStatus()
- Returns:
- productStatus
-
setMinProductIndexId
public void setMinProductIndexId(java.lang.Long minProductIndexId)
- Parameters:
minProductIndexId
- to set
-
getMinProductIndexId
public java.lang.Long getMinProductIndexId()
- Returns:
- minProductIndexId
-
setLimit
public void setLimit(java.lang.Integer limit)
- Parameters:
limit
- to set
-
getLimit
public java.lang.Integer getLimit()
- Returns:
- limit
-
setOrderBy
public void setOrderBy(java.lang.String orderBy)
- Parameters:
orderBy
- to set
-
getOrderBy
public java.lang.String getOrderBy()
- Returns:
- orderBy
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(ProductIndexQuery that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ProductIndexQuery>
-
compare
protected <T extends java.lang.Comparable<T>> int compare(T o1, T o2)
Compare function- Type Parameters:
T
- Type- Parameters:
o1
- First item to compareo2
- Second to comoare- Returns:
- 0 if equal, 1 if o1 is null, -1 if o2 null, or the comparison
-
log
public void log(java.util.logging.Logger logger)
Log function- Parameters:
logger
- logger object
-
-