2.17.2: 2011-06-17

net.sf.basedb.core
Interface SystemItem

All Superinterfaces:
AccessControlled, Identifiable
All Known Implementing Classes:
BioPlateEventType, Directory, FileType, Group, HardwareType, ProtocolType, Quantity, Quota, QuotaType, Role, SoftwareType, User

public interface SystemItem
extends Identifiable

A SystemItem is an item which has an additional systemwide unique 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.

Items with a system id can only be created during installation and cannot be removed.

Reference implementation

public String getSystemId()
{
   return getData().getSystemId();
}
public boolean isSystemItem()
{
   return getSystemId() != null;
}

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Field Summary
static int MAX_SYSTEM_ID_LENGTH
          The maximum length of the system ID that can be stored in the database.
 
Method Summary
 String getSystemId()
          Get the system id for the item.
 boolean isSystemItem()
          Check if the item is a system item or not.
 
Methods inherited from interface net.sf.basedb.core.Identifiable
getId, getType, getVersion
 
Methods inherited from interface net.sf.basedb.core.AccessControlled
checkPermission, getPermissions, hasPermission
 

Field Detail

MAX_SYSTEM_ID_LENGTH

static final int MAX_SYSTEM_ID_LENGTH
The maximum length of the system ID that can be stored in the database.

See Also:
getSystemId(), Constant Field Values
Method Detail

getSystemId

String getSystemId()
Get the system id for the item.

Returns:
The id of the item or null if it is not a system item

isSystemItem

boolean isSystemItem()
Check if the item is a system item or not. A system item have a non-null value for the system id.

Returns:
TRUE if this item is a system item, FALSE otherwise

2.17.2: 2011-06-17