2.8.0: 2008-09-08

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: 2008-09-05 17:16:27 +0200 (Fri, 05 Sep 2008) $

Field Summary
private  int location
           
private  QuotaTypeData quotaType
           
 
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.
(package private)  void setLocation(int location)
           
(package private)  void setQuotaType(QuotaTypeData quotaType)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

2.8.0: 2008-09-08