Class MediaOrderCriteria
java.lang.Object
org.silverpeas.components.gallery.model.MediaOrderCriteria
Class that permits to set order search criteria for order application.
- Author:
- Yohann Chastagnier
-
Method Summary
Modifier and TypeMethodDescriptionstatic MediaOrderCriteriafromComponentInstanceId(String componentInstanceId) Initializes order search criteria axed on the given order component instance id.static MediaOrderCriteriafromNbDaysAfterThatDeleteAnOrder(int nbDays) Initializes order search criteria axed on the given order identifier.Gets the identifier of order instance.identifierIsOneOf(String... identifiers) Sets the identifiers criterion to find the orders with an identifier equals to one of the specified ones.voidprocessWith(MediaOrderCriteriaProcessor processor) Processes these criteria with the specified processor.referenceDateOf(Date referenceDate) Sets the reference date criterion (the date of the day by default).withOrdererId(String ordererId) Sets the orderer identifier.
-
Method Details
-
fromComponentInstanceId
Initializes order search criteria axed on the given order component instance id.- Parameters:
componentInstanceId- the identifier of the component instance.- Returns:
- an instance of order criteria based on the specified identifier of component instance.
-
fromNbDaysAfterThatDeleteAnOrder
Initializes order search criteria axed on the given order identifier.- Returns:
- an empty instance of order criteria.
-
withOrdererId
Sets the orderer identifier.- Parameters:
ordererId- the orderer identifier.- Returns:
- an instance of order criteria with the orderer criterion filled.
-
identifierIsOneOf
Sets the identifiers criterion to find the orders with an identifier equals to one of the specified ones.- Parameters:
identifiers- a list of identifiers the orders to find should have.- Returns:
- the order criteria itself with the new criterion on the order identifiers.
-
referenceDateOf
Sets the reference date criterion (the date of the day by default).- Parameters:
referenceDate- the reference date specified.- Returns:
- the order criteria itself with the new criterion on the reference date.
-
getComponentInstanceId
Gets the identifier of order instance.fromComponentInstanceId(String)- Returns:
- the criterion on the order instance to which the orders should belong.
-
processWith
Processes these criteria with the specified processor. It chains in a given order the different criterion to process.- Parameters:
processor- the processor to use for processing each criterion in these criteria.
-