|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DiskConsumableData
A diskconsumable item is an item that occupies a lot of diskspace and
should be controlled by the quota system. The DiskUsageData
object is ued to hold information about the size, location, owner, etc.
of the item.
This interface defines Hibernate database mappings for the
diskUsage
property to the database column
diskusage_id
. If a subclass wants
to map the property to another column, it should override
the getDiskUsage()
method and add a Hibernate tag in the comment.
Hibernate also requires a setDiskUsage()
method, so this must
also be implemented even though it is not required by this interface.
Reference implementation
private DiskUsageData diskUsage; public DiskUsageData getDiskUsage() { if (diskUsage == null) diskUsage = new DiskUsageData(); return diskUsage; } void setDiskUsage(DiskUsageData diskUsage) { this.diskUsage = diskUsage; }Since there is a one-to-one relation between the item and the
DiskUsageData
object which should not be changed once it is created the recommended implementation
has a package private set method (used only by Hibernate).
DiskUsageData
,
DiskConsumable
,
Quota overviewMethod Summary | |
---|---|
DiskUsageData |
getDiskUsage()
Get the DiskUsageData that this item use. |
Methods inherited from interface net.sf.basedb.core.data.OwnableData |
---|
getOwner, setOwner |
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData |
---|
getId, getVersion |
Method Detail |
---|
DiskUsageData getDiskUsage()
DiskUsageData
that this item use.
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |