|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.BasicItem<QuotaTypeData>
net.sf.basedb.core.QuotaType
public class QuotaType
This class represents the different types a quota can have.
| Field Summary | |
|---|---|
static String |
EXPERIMENT
The ID for experiments. |
static String |
FILE
The ID for the file. |
static String |
RAW_DATA
The ID for the raw data. |
static String |
TOTAL
The ID for the total quota. |
static Item |
TYPE
The type of item represented by this class. |
| Fields inherited from interface net.sf.basedb.core.Nameable |
|---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
| Fields inherited from interface net.sf.basedb.core.SystemItem |
|---|
MAX_SYSTEM_ID_LENGTH |
| Constructor Summary | |
|---|---|
QuotaType(QuotaTypeData data)
Creates a new QuotaType item. |
|
| Method Summary | |
|---|---|
static QuotaType |
getById(DbControl dc,
int id)
Get a QuotaType object when you know the id. |
String |
getDescription()
Get the description for the item. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
String |
getName()
Get the name of the item. |
static ItemQuery<QuotaType> |
getQuery()
Get a query configured to retrieve QuotaType. |
String |
getSystemId()
Get the system id for the item. |
Item |
getType()
Get the type of item represented by the object. |
boolean |
hasSecondaryLocation()
Check if items using quota from this quota type can be stored in the secondary location or not. |
(package private) void |
initPermissions(int granted,
int denied)
The logged in user has read permission to the quota assigned to him/her. |
boolean |
isSystemItem()
Check if the item is a system item or not. |
boolean |
isUsed()
Check if this item is used by some other item. |
void |
setDescription(String description)
Set the description for the item. |
void |
setName(String name)
Set the name of the item. |
| Methods inherited from class net.sf.basedb.core.BasicItem |
|---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.basedb.core.Identifiable |
|---|
getId, getVersion |
| Methods inherited from interface net.sf.basedb.core.AccessControlled |
|---|
checkPermission, getPermissions, hasPermission |
| Field Detail |
|---|
public static final Item TYPE
Item.QUOTATYPE,
getType()public static final String TOTAL
public static final String FILE
public static final String RAW_DATA
public static final String EXPERIMENT
| Constructor Detail |
|---|
QuotaType(QuotaTypeData data)
QuotaType item.
data - The data class for this item.| Method Detail |
|---|
public static QuotaType getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
QuotaType object when you know the id.
dc - The DbControl which will be used for
permission checking and database access.id - The id of the item to load
QuotaType item
ItemNotFoundException - This exception is thrown if an
item with the specified ID is not found
PermissionDeniedException - This exception is thrown if
the logged in user doesn't have READ
permission to the items
BaseException - This exception is thrown if there is another
errorpublic static ItemQuery<QuotaType> getQuery()
QuotaType. All logged
in users have READ permission to all QuotaType items.
ItemQuery objectpublic Item getType()
IdentifiableItem enumeration.
getType in interface Identifiablepublic String getName()
Nameable
getName in interface NameableString with the name of the item
public void setName(String name)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_NAME_LENGTH constant.
setName in interface Nameablename - The new name for the item
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH constantpublic String getDescription()
Nameable
getDescription in interface NameableString with a description of the item
public void setDescription(String description)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_DESCRIPTION_LENGTH constant.
setDescription in interface Nameabledescription - The new description for the item
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH constantpublic String getSystemId()
SystemItem
getSystemId in interface SystemItempublic boolean isSystemItem()
SystemItem
isSystemItem in interface SystemItempublic Date getEntryDate()
Registered
getEntryDate in interface Registeredpublic boolean isUsed()
BasicItemsuper.isUsed(), unless it has decided
that the item is used by some other means.
isUsed in class BasicItem<QuotaTypeData>BasicItem.getUsingItems()
void initPermissions(int granted,
int denied)
throws BaseException
initPermissions in class BasicItem<QuotaTypeData>granted - Permissions that have been granted by the subclassdenied - Permissions that have been denied by the subclass
BaseException - This exception is thrown if there is any errorpublic boolean hasSecondaryLocation()
true if the secondary location can be used, false otherwise
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||