Class Contributions


  • public class Contributions
    extends java.lang.Object
    Tracking the contibutions of ware over the last seven days rolling.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2012 Created on Jul 24, 2012
    • Constructor Summary

      Constructors 
      Constructor Description
      Contributions()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contribute​(IWare ware, int amount)
      Contribute the amount of the ware.
      int getContribution​(IWare ware)
      Retrieve the contribution for the whole week
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • date

        @Autowired
        private Date date
      • contributions

        private com.google.common.collect.Multimap<IWare,​Contribution> contributions
    • Constructor Detail

      • Contributions

        public Contributions()
    • Method Detail

      • getContribution

        public int getContribution​(IWare ware)
        Retrieve the contribution for the whole week
        Parameters:
        ware - for thitch to find the contribution
        Returns:
        summed up contributions of the last wek.
      • contribute

        public void contribute​(IWare ware,
                               int amount)
        Contribute the amount of the ware. the amount may be possitive or negative
        Parameters:
        ware - that is contributed
        amount - of the contributed ware