public class QuotaIndex
extends java.lang.Object
implements java.io.Serializable
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.Modifier and Type | Field and Description |
---|---|
private int |
location |
private long |
maxBytes |
private QuotaTypeData |
quotaType |
private static long |
serialVersionUID |
Constructor and Description |
---|
QuotaIndex() |
QuotaIndex(QuotaTypeData quotaType,
int location) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Check if this object is equal to another
QuotaIndex
object. |
QuotaIndex |
find(java.util.Set<QuotaIndex> quota)
Find the quota entry in the given set that correpsonds to
the same quota type and location as this index.
|
java.lang.Long |
findMaxBytes(java.util.Set<QuotaIndex> quota)
Find the quota index entry in the given set and return the 'maxBytes' value.
|
int |
getLocation() |
long |
getMaxBytes() |
(package private) QuotaTypeData |
getQuotaType() |
int |
hashCode()
Calculate the hash code for the object.
|
private void |
readObject(java.io.ObjectInputStream ois) |
(package private) void |
setLocation(int location) |
void |
setMaxBytes(long maxBytes) |
(package private) void |
setQuotaType(QuotaTypeData quotaType) |
java.lang.String |
toString() |
private void |
writeObject(java.io.ObjectOutputStream ois) |
private static final long serialVersionUID
private int location
private transient QuotaTypeData quotaType
private long maxBytes
QuotaIndex()
public QuotaIndex(QuotaTypeData quotaType, int location)
public int getLocation()
void setLocation(int location)
QuotaTypeData getQuotaType()
void setQuotaType(QuotaTypeData quotaType)
public long getMaxBytes()
public void setMaxBytes(long maxBytes)
public java.lang.Long findMaxBytes(java.util.Set<QuotaIndex> quota)
public QuotaIndex find(java.util.Set<QuotaIndex> quota)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
QuotaIndex
object. They are equal if both have the same quotatype id and location.equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
private void readObject(java.io.ObjectInputStream ois) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
private void writeObject(java.io.ObjectOutputStream ois) throws java.io.IOException
java.io.IOException