Class RegularCustomerOrderTotalRestriction

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable

    public class RegularCustomerOrderTotalRestriction
    extends GeneratedRegularCustomerOrderTotalRestriction
    This restriction restricts vouchers to customers who ordered a total of X EUR or greater in their lifetime.
    See Also:
    Serialized Form
    • Constructor Detail

      • RegularCustomerOrderTotalRestriction

        public RegularCustomerOrderTotalRestriction()
    • Method Detail

      • getMessageAttributeValues

        protected java.lang.String[] getMessageAttributeValues()
        Description copied from class: Restriction
        Returns the values for making violation messages more useful.
        Overrides:
        getMessageAttributeValues in class Restriction
      • isFulfilledInternal

        protected boolean isFulfilledInternal​(AbstractOrder anOrder)
        Returns true if the specified abstract order fulfills this restriction. More formally, returns true if the user of the specified abstract order has (not) placed orders amounting to a total defined by this restriction before.
        Specified by:
        isFulfilledInternal in class Restriction
        Parameters:
        anOrder - the abstract order to check whether it fullfills this restriction.
        Returns:
        true if the specified abstract order fulfills this restriction, false else.
        See Also:
        Restriction.isFulfilledInternal(AbstractOrder)
      • isFulfilledInternal

        protected boolean isFulfilledInternal​(Product aProduct)
        Returns true if the specified product fulfills this restriction.
        Specified by:
        isFulfilledInternal in class Restriction
        Parameters:
        aProduct - the product to check whether it fullfills this restriction.
        Returns:
        true if the specified product fulfills this restriction, false else.
        See Also:
        Restriction.isFulfilledInternal(Product)