Klasse ProductQuery

java.lang.Object
de.dlr.proseo.model.PersistentObject
de.dlr.proseo.model.ProductQuery

@Entity public class ProductQuery extends PersistentObject
A ProductQuery models the need of a JobStep to use a Product of a certain ProductClass for a specific time period. The time period can be defined by conditions, and a Product is said to satisfy a ProductQuery, if it matches the given conditions. A JobStep can be executed as soon as all its ProductQuerys are satisfied.
Autor:
Dr. Thomas Bassler
  • Konstruktordetails

    • ProductQuery

      public ProductQuery()
  • Methodendetails

    • fromSimpleSelectionRule

      public static ProductQuery fromSimpleSelectionRule(SimpleSelectionRule selectionRule, JobStep jobStep, Map<String,String> productColumnMapping, String facilityQuerySql, String facilityQuerySqlSubselect)
      Create a product query from a simple selection rule for a given job step
      Parameter:
      selectionRule - the selection rule to create the product query from
      jobStep - the job step to generate the product query for
      productColumnMapping - a mapping from attribute names of the Product class to the corresponding SQL column names
      facilityQuerySql - an SQL selection string to add to the selection rule SQL query
      facilityQuerySqlSubselect - an SQL selection string to add to sub-SELECTs in selection policy SQL query conditions
      Gibt zurück:
      a product query object
    • getJobStep

      public JobStep getJobStep()
      Gets the job step issuing the query
      Gibt zurück:
      the jobStep
    • setJobStep

      public void setJobStep(JobStep jobStep)
      Sets the job step issuing the query
      Parameter:
      jobStep - the jobStep to set
    • getGeneratingRule

      public SimpleSelectionRule getGeneratingRule()
      Gets the selection rule that generated this product query
      Gibt zurück:
      the generatingRule
    • setGeneratingRule

      public void setGeneratingRule(SimpleSelectionRule generatingRule)
      Sets the selection rule that generated this product query
      Parameter:
      generatingRule - the generatingRule to set
    • getRequestedProductClass

      public ProductClass getRequestedProductClass()
      Gets the requested product class
      Gibt zurück:
      the requestedProductClass
    • setRequestedProductClass

      public void setRequestedProductClass(ProductClass requestedProductClass)
      Sets the requested product class
      Parameter:
      requestedProductClass - the requestedProductClass to set
    • getJpqlQueryCondition

      public String getJpqlQueryCondition()
      Gets the JPQL query condition
      Gibt zurück:
      the jpqlQueryCondition
    • setJpqlQueryCondition

      public void setJpqlQueryCondition(String jpqlQueryCondition)
      Sets the JPQL query condition
      Parameter:
      jpqlQueryCondition - the jpqlQueryCondition to set
    • getSqlQueryCondition

      public String getSqlQueryCondition()
      Gets the SQL query condition
      Gibt zurück:
      the sqlQueryCondition
    • setSqlQueryCondition

      public void setSqlQueryCondition(String sqlQueryCondition)
      Sets the SQL query condition
      Parameter:
      sqlQueryCondition - the sqlQueryCondition to set
    • getFilterConditions

      public Map<String,Parameter> getFilterConditions()
      Gets the additional filtering conditions
      Gibt zurück:
      the filter conditions
    • setFilterConditions

      public void setFilterConditions(Map<String,Parameter> filterConditions)
      Sets the additional filtering conditions
      Parameter:
      filterConditions - the filter conditions to set
    • getMinimumCoverage

      @Deprecated public Short getMinimumCoverage()
      Veraltet.
      Gets the minimum percentage of coverage of the desired validity period Deprecated, use getGeneratingRule().getMinimumCoverage() instead
      Gibt zurück:
      the minimumCoverage
    • setMinimumCoverage

      @Deprecated public void setMinimumCoverage(Short minimumCoverage)
      Veraltet.
      Sets the minimum percentage of coverage of the desired validity period Deprecated, use getGeneratingRule().setMinimumCoverage() instead
      Parameter:
      minimumCoverage - the minimumCoverage to set
    • getIsSatisfied

      public Boolean getIsSatisfied()
      Check whether this product query is satisfied
      Gibt zurück:
      the isSatisfied
    • isSatisfied

      public Boolean isSatisfied()
      Check whether this product query is satisfied (convenience alias for getIsSatisfied())
      Gibt zurück:
      the isSatisfied
    • getInDownload

      public Boolean getInDownload()
      Gibt zurück:
      the inDownload
    • setInDownload

      public void setInDownload(Boolean inDownload)
      Parameter:
      inDownload - the inDownload to set
    • setIsSatisfied

      public void setIsSatisfied(Boolean isSatisfied)
      Indicate that this product query is satisfied
      Parameter:
      isSatisfied - the isSatisfied to set
    • getSatisfyingProducts

      public Set<Product> getSatisfyingProducts()
      Get the products satisfying this query
      Gibt zurück:
      the satisfyingProducts
    • setSatisfyingProducts

      public void setSatisfyingProducts(Set<Product> satisfyingProducts)
      Set the products satisfying this query
      Parameter:
      satisfyingProducts - the satisfyingProducts to set
    • testFilterConditions

      public boolean testFilterConditions(Product product)
      Test whether the given product satisfies the filter conditions of this query
      Parameter:
      product - the product to test
      Gibt zurück:
      true, if all filter conditions are met, false otherwise
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse PersistentObject
    • equals

      public boolean equals(Object obj)
      Beschreibung aus Klasse kopiert: PersistentObject
      Test equality of persistent objects based on their unique ID.
      Setzt außer Kraft:
      equals in Klasse PersistentObject
      Parameter:
      obj - the object to compare this object to
      Gibt zurück:
      true, if obj is a persistent object and has the same ID, false otherwise
      Siehe auch:
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object