2.17.2: 2011-06-17

net.sf.basedb.core.data
Class QuotaIndex

java.lang.Object
  extended by net.sf.basedb.core.data.QuotaIndex
All Implemented Interfaces:
Serializable

public class QuotaIndex
extends Object
implements 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:
Quota overview, Serialized Form
Last modified
$Date: 2010-08-13 10:50:27 +0200 (Fri, 13 Aug 2010) $

Field Summary
private  int location
           
private  QuotaTypeData quotaType
           
private static long serialVersionUID
           
 
Constructor Summary
QuotaIndex()
           
QuotaIndex(QuotaTypeData quotaType, int location)
           
 
Method Summary
 boolean equals(Object o)
          Check if this object is equal to another QuotaIndex object.
 int getLocation()
           
 QuotaTypeData getQuotaType()
           
 int hashCode()
          Calculate the hash code for the object.
private  void readObject(ObjectInputStream ois)
           
(package private)  void setLocation(int location)
           
(package private)  void setQuotaType(QuotaTypeData quotaType)
           
private  void writeObject(ObjectOutputStream ois)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

location

private int location

quotaType

private transient QuotaTypeData quotaType
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

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

setQuotaType

void setQuotaType(QuotaTypeData quotaType)

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

readObject

private void readObject(ObjectInputStream ois)
                 throws ClassNotFoundException,
                        IOException
Throws:
ClassNotFoundException
IOException

writeObject

private void writeObject(ObjectOutputStream ois)
                  throws IOException
Throws:
IOException

2.17.2: 2011-06-17