Class MediaOrderCriteria
- java.lang.Object
-
- org.silverpeas.components.gallery.model.MediaOrderCriteria
-
public class MediaOrderCriteria extends Object
Class that permits to set order search criteria for order application.- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediaOrderCriteria
fromComponentInstanceId(String componentInstanceId)
Initializes order search criteria axed on the given order component instance id.static MediaOrderCriteria
fromNbDaysAfterThatDeleteAnOrder(int nbDays)
Initializes order search criteria axed on the given order identifier.String
getComponentInstanceId()
Gets the indetifier of order instance.MediaOrderCriteria
identifierIsOneOf(String... identifiers)
Sets the identifiers criterion to find the orders with an identifier equals to one of the specified ones.void
processWith(MediaOrderCriteriaProcessor processor)
Processes this criteria with the specified processor.MediaOrderCriteria
referenceDateOf(Date referenceDate)
Sets the reference date criterion (the date of the day by default).MediaOrderCriteria
withOrdererId(String ordererId)
Sets the orderer identifier.
-
-
-
Method Detail
-
fromComponentInstanceId
public static MediaOrderCriteria fromComponentInstanceId(String componentInstanceId)
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
public static MediaOrderCriteria fromNbDaysAfterThatDeleteAnOrder(int nbDays)
Initializes order search criteria axed on the given order identifier.- Returns:
- an empty instance of order criteria.
-
withOrdererId
public MediaOrderCriteria withOrdererId(String ordererId)
Sets the orderer identifier.- Parameters:
ordererId
- the orderer identifier.- Returns:
- an instance of order criteria with the orderer criterion filled.
-
identifierIsOneOf
public MediaOrderCriteria identifierIsOneOf(String... identifiers)
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
public MediaOrderCriteria referenceDateOf(Date referenceDate)
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
public String getComponentInstanceId()
Gets the indetifier of order instance.fromComponentInstanceId(String)
- Returns:
- the criterion on the order instance to which the orders should belong.
-
processWith
public void processWith(MediaOrderCriteriaProcessor processor)
Processes this 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 this criteria.
-
-