Package de.dlr.proseo.model
Klasse ProductQuery
java.lang.Object
de.dlr.proseo.model.PersistentObject
de.dlr.proseo.model.ProductQuery
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
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Test equality of persistent objects based on their unique ID.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 stepGets the additional filtering conditionsGets the selection rule that generated this product queryCheck whether this product query is satisfiedGets the job step issuing the queryGets the JPQL query conditionVeraltet.Gets the requested product classGet the products satisfying this queryGets the SQL query conditionint
hashCode()
Check whether this product query is satisfied (convenience alias for getIsSatisfied())void
setFilterConditions
(Map<String, Parameter> filterConditions) Sets the additional filtering conditionsvoid
setGeneratingRule
(SimpleSelectionRule generatingRule) Sets the selection rule that generated this product queryvoid
setInDownload
(Boolean inDownload) void
setIsSatisfied
(Boolean isSatisfied) Indicate that this product query is satisfiedvoid
setJobStep
(JobStep jobStep) Sets the job step issuing the queryvoid
setJpqlQueryCondition
(String jpqlQueryCondition) Sets the JPQL query conditionvoid
setMinimumCoverage
(Short minimumCoverage) Veraltet.void
setRequestedProductClass
(ProductClass requestedProductClass) Sets the requested product classvoid
setSatisfyingProducts
(Set<Product> satisfyingProducts) Set the products satisfying this queryvoid
setSqlQueryCondition
(String sqlQueryCondition) Sets the SQL query conditionboolean
testFilterConditions
(Product product) Test whether the given product satisfies the filter conditions of this querytoString()
Von Klasse geerbte Methoden de.dlr.proseo.model.PersistentObject
getId, getVersion, incrementVersion, setId
-
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 fromjobStep
- the job step to generate the product query forproductColumnMapping
- a mapping from attribute names of the Product class to the corresponding SQL column namesfacilityQuerySql
- an SQL selection string to add to the selection rule SQL queryfacilityQuerySqlSubselect
- an SQL selection string to add to sub-SELECTs in selection policy SQL query conditions- Gibt zurück:
- a product query object
-
getJobStep
Gets the job step issuing the query- Gibt zurück:
- the jobStep
-
setJobStep
Sets the job step issuing the query- Parameter:
jobStep
- the jobStep to set
-
getGeneratingRule
Gets the selection rule that generated this product query- Gibt zurück:
- the generatingRule
-
setGeneratingRule
Sets the selection rule that generated this product query- Parameter:
generatingRule
- the generatingRule to set
-
getRequestedProductClass
Gets the requested product class- Gibt zurück:
- the requestedProductClass
-
setRequestedProductClass
Sets the requested product class- Parameter:
requestedProductClass
- the requestedProductClass to set
-
getJpqlQueryCondition
Gets the JPQL query condition- Gibt zurück:
- the jpqlQueryCondition
-
setJpqlQueryCondition
Sets the JPQL query condition- Parameter:
jpqlQueryCondition
- the jpqlQueryCondition to set
-
getSqlQueryCondition
Gets the SQL query condition- Gibt zurück:
- the sqlQueryCondition
-
setSqlQueryCondition
Sets the SQL query condition- Parameter:
sqlQueryCondition
- the sqlQueryCondition to set
-
getFilterConditions
Gets the additional filtering conditions- Gibt zurück:
- the filter conditions
-
setFilterConditions
Sets the additional filtering conditions- Parameter:
filterConditions
- the filter conditions to set
-
getMinimumCoverage
Veraltet.Gets the minimum percentage of coverage of the desired validity period Deprecated, use getGeneratingRule().getMinimumCoverage() instead- Gibt zurück:
- the minimumCoverage
-
setMinimumCoverage
Veraltet.Sets the minimum percentage of coverage of the desired validity period Deprecated, use getGeneratingRule().setMinimumCoverage() instead- Parameter:
minimumCoverage
- the minimumCoverage to set
-
getIsSatisfied
Check whether this product query is satisfied- Gibt zurück:
- the isSatisfied
-
isSatisfied
Check whether this product query is satisfied (convenience alias for getIsSatisfied())- Gibt zurück:
- the isSatisfied
-
getInDownload
- Gibt zurück:
- the inDownload
-
setInDownload
- Parameter:
inDownload
- the inDownload to set
-
setIsSatisfied
Indicate that this product query is satisfied- Parameter:
isSatisfied
- the isSatisfied to set
-
getSatisfyingProducts
Get the products satisfying this query- Gibt zurück:
- the satisfyingProducts
-
setSatisfyingProducts
Set the products satisfying this query- Parameter:
satisfyingProducts
- the satisfyingProducts to set
-
testFilterConditions
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 KlassePersistentObject
-
equals
Beschreibung aus Klasse kopiert:PersistentObject
Test equality of persistent objects based on their unique ID.- Setzt außer Kraft:
equals
in KlassePersistentObject
- 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
-