Class Quota

    • Constructor Detail

      • Quota

        public Quota()
        Constructor for JPA and internal services.
      • Quota

        public Quota​(Quota other)
        Copy constructor.
        Parameters:
        other - the quota to copy.
    • Method Detail

      • exists

        public boolean exists()
        Indicates if the quota is well registred
        Returns:
      • getLoad

        public QuotaLoad getLoad()
        Indicates by a basic way the load of the data
        Returns:
      • isNotUnlimitedLoad

        public boolean isNotUnlimitedLoad()
      • isReached

        public boolean isReached()
        Indicates if the quota is reached or not
        Returns:
      • getLoadRate

        public BigDecimal getLoadRate()
        Calculates the load rate of the quota without rounded rounded at 20 decimals
        Returns:
      • getLoadPercentage

        public BigDecimal getLoadPercentage()
        Calculates the load percentage of the quota rounded at two decimals
        Returns:
      • setQuotaId

        public void setQuotaId​(Long id)
        Parameters:
        id - the id to set
      • getType

        public QuotaType getType()
        Returns:
        the type
      • setType

        public void setType​(QuotaType type)
        Parameters:
        type - the type to set
      • setType

        public void setType​(String type)
        Parameters:
        type - the type to set
      • getResourceId

        public String getResourceId()
        Returns:
        the resourceId
      • setResourceId

        public void setResourceId​(String resourceId)
        Parameters:
        resourceId - the resourceId to set
      • getMinCount

        public long getMinCount()
        Returns:
        the minCount
      • setMinCount

        public void setMinCount​(long minCount)
        Parameters:
        minCount - the minCount to set
      • getMaxCount

        public long getMaxCount()
        Returns:
        the maxCount
      • setMaxCount

        public void setMaxCount​(long maxCount)
        Parameters:
        maxCount - the maxCount to set
      • getCount

        public long getCount()
        Returns:
        the count
      • setCount

        public void setCount​(long count)
        Parameters:
        count - the count to set
      • getSaveDate

        public Date getSaveDate()
        Returns:
        the saveDate
      • setSaveDate

        public void setSaveDate​(Date saveDate)
        Parameters:
        saveDate - the saveDate to set