Class QuotaIndex

    • Field Detail

      • location

        private int location
      • maxBytes

        private long maxBytes
    • Constructor Detail

      • QuotaIndex

        QuotaIndex()
      • QuotaIndex

        public QuotaIndex​(QuotaTypeData quotaType,
                          int location)
    • Method Detail

      • getLocation

        public int getLocation()
        Hibernate: property
        column="`location`" type="int"
      • setLocation

        void setLocation​(int location)
      • getQuotaType

        QuotaTypeData getQuotaType()
        Hibernate: many-to-one
        column="`quotaType_id`" outer-join="false"
      • getMaxBytes

        public long getMaxBytes()
        Hibernate: property
        column="`max_bytes`" type="long"
      • setMaxBytes

        public void setMaxBytes​(long maxBytes)
      • findMaxBytes

        public Long findMaxBytes​(Set<QuotaIndex> quota)
        Find the quota index entry in the given set and return the 'maxBytes' value. NOTE! Used to be stored in a Map, but due to changes between Hibernate 3 and Hibernate 4 this seems to no longer work and we need to do it like this instead.
        Since:
        3.4
      • find

        public QuotaIndex find​(Set<QuotaIndex> quota)
        Find the quota entry in the given set that correpsonds to the same quota type and location as this index.
        Since:
        3.9
      • equals

        public boolean equals​(Object o)
        Check if this object is equal to another QuotaIndex object. They are equal if both have the same quotatype id and location.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Calculate the hash code for the object.
        Overrides:
        hashCode in class Object