2.17.2: 2011-06-17

net.sf.basedb.core.data
Interface DiskConsumableData

All Superinterfaces:
IdentifiableData, OwnableData
All Known Implementing Classes:
ExperimentData, FileData, RawBioAssayData

public interface DiskConsumableData
extends OwnableData

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).

Version:
2.0
Author:
enell
See Also:
DiskUsageData, DiskConsumable, Quota overview

Method 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

getDiskUsage

DiskUsageData getDiskUsage()
Get the DiskUsageData that this item use.

Hibernate: many-to-one
column="`diskusage_id`" not-null="true" outer-join="false" unique="true" cascade="all"

2.17.2: 2011-06-17