Interface SystemData

All Superinterfaces:
IdentifiableData
All Known Implementing Classes:
BioPlateEventTypeData, DirectoryData, GroupData, ItemSubtypeData, QuantityData, QuotaData, QuotaTypeData, RoleData, UserData

public interface SystemData extends IdentifiableData
A system item is an item which has an additional id in the form of string. A system id is required when we need to make sure that we can get a specific item without knowing the numeric id. Example of such items are the root user and the everyone group. The system id:s are defined by the core layer, since the actual values are of no interest to the data layer. It is recommended that the id:s are constructed as: net.sf.basedb.core.User.ROOT.

This interface defines Hibernate database mappings for the systemId property to the database column system_id. If a subclass wants to map the property to another column, it should override the getSystemId() method and add a Hibernate tag in the comment.

Hibernate also requires a setSystemId() method, so this must also be implemented even though it is not required by this interface.

Reference implementation

private String systemId;
public String getSystemId()
{
   return systemId;
}
public void setSystemId(String systemId)
{
   this.systemId = systemId;
}
Version:
2.0
Author:
Nicklas
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The maximum length of the system ID of the item that can be stored in the database.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the system id for the item.

    Methods inherited from interface net.sf.basedb.core.data.IdentifiableData

    getId, getVersion
  • Field Details

    • MAX_SYSTEM_ID_LENGTH

      static final int MAX_SYSTEM_ID_LENGTH
      The maximum length of the system ID of the item that can be stored in the database.
      Since:
      2.5
      See Also:
  • Method Details

    • getSystemId

      String getSystemId()
      Get the system id for the item.
      Returns:
      The id of the item or null
      Hibernate: property
      column="`system_id`" type="string" length="255" not-null="false" update="false"