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:
  • Method Details

    • 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"