Package net.sf.basedb.core.data
Class QuotaIndex
java.lang.Object
net.sf.basedb.core.data.QuotaIndex
- All Implemented Interfaces:
Serializable
This is a helper class for the
QuotaData
item to
help with the Hibernate mapping between quota and
quota type/location/max bytes. This class holds quota type/location
pairs used as keys in the QuotaData.getQuotaValues()
map.- Version:
- 2.0
- Author:
- enell
- See Also:
- Last modified
- $Date: 2016-05-23 12:47:45 +0200 (må, 23 maj 2016) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private long
private QuotaTypeData
private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this object is equal to anotherQuotaIndex
object.find
(Set<QuotaIndex> quota) Find the quota entry in the given set that correpsonds to the same quota type and location as this index.findMaxBytes
(Set<QuotaIndex> quota) Find the quota index entry in the given set and return the 'maxBytes' value.int
long
(package private) QuotaTypeData
int
hashCode()
Calculate the hash code for the object.private void
(package private) void
setLocation
(int location) void
setMaxBytes
(long maxBytes) (package private) void
setQuotaType
(QuotaTypeData quotaType) toString()
private void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
location
private int location -
quotaType
-
maxBytes
private long maxBytes
-
-
Constructor Details
-
QuotaIndex
QuotaIndex() -
QuotaIndex
-
-
Method Details
-
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"
-
setQuotaType
-
getMaxBytes
public long getMaxBytes()- Hibernate: property
- column="`max_bytes`" type="long"
-
setMaxBytes
public void setMaxBytes(long maxBytes) -
findMaxBytes
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
Find the quota entry in the given set that correpsonds to the same quota type and location as this index.- Since:
- 3.9
-
toString
-
equals
Check if this object is equal to anotherQuotaIndex
object. They are equal if both have the same quotatype id and location. -
hashCode
public int hashCode()Calculate the hash code for the object. -
readObject
- Throws:
ClassNotFoundException
IOException
-
writeObject
- Throws:
IOException
-