Package net.sf.basedb.core
Class AnnotationTypeCategory
- java.lang.Object
-
- net.sf.basedb.core.BasicItem
-
- net.sf.basedb.core.OwnedItem
-
- net.sf.basedb.core.SharedItem
-
- net.sf.basedb.core.CommonItem
-
- net.sf.basedb.core.AnnotationTypeCategory
-
- All Implemented Interfaces:
AccessControlled
,Identifiable
,Nameable
,Ownable
,Registered
,Removable
,Shareable
public class AnnotationTypeCategory extends CommonItem implements Registered
Objects of this class defines an annotation type category. The categories are used to group relatedAnnotationType
:s.An annotation type can belong to more than one category.
- Version:
- 2.0
- Author:
- Dominic Oyeniran
- See Also:
AnnotationType
- Last modified
- $Date: 2006-05-11 (Thu, 11 May 2006) $
-
-
Field Summary
Fields Modifier and Type Field Description 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
-
-
Constructor Summary
Constructors Constructor Description AnnotationTypeCategory(AnnotationTypeCategoryData annotationTypeCategoryData)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemQuery<AnnotationType>
getAnnotationTypes(Item itemType)
Gets a query that returns the annotation types that are members of this categorystatic AnnotationTypeCategory
getById(DbControl dc, int id)
Get anAnnotationTypeCategory
item when you know the id.(package private) AnnotationTypeCategoryData
getData()
Get theBasicData
object that holds all data for this item.Date
getEntryDate()
Get the date that the item was registered in the database.static AnnotationTypeCategory
getNew(DbControl dc)
Creates a newAnnotationTypeCategory
item.static ItemQuery<AnnotationTypeCategory>
getQuery()
Get aItemQuery
object configured to retrieveAnnotationTypeCategory
items.Item
getType()
Get the type of item represented by the object.void
setEntryDate(Date entryDate)
Set the date the entry was registered in the database.-
Methods inherited from class net.sf.basedb.core.CommonItem
getDescription, getName, getRemovedBy, isRemoved, setDescription, setName, setRemoved
-
Methods inherited from class net.sf.basedb.core.SharedItem
getItemKey, getProjectKey, initPermissions, isShared, onBeforeCommit, setItemKey, setProjectKey
-
Methods inherited from class net.sf.basedb.core.OwnedItem
getOwner, isOwner, setOwner, takeOwnership
-
Methods inherited from class net.sf.basedb.core.BasicItem
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, validate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.basedb.core.AccessControlled
checkPermission, getPermissions, hasPermission
-
Methods inherited from interface net.sf.basedb.core.Identifiable
getId, getVersion
-
Methods inherited from interface net.sf.basedb.core.Ownable
getOwner, isOwner, setOwner, takeOwnership
-
-
-
-
Field Detail
-
TYPE
public static final Item TYPE
The type of item represented by this class.- See Also:
Item.ANNOTATIONTYPECATEGORY
,getType()
-
-
Constructor Detail
-
AnnotationTypeCategory
AnnotationTypeCategory(AnnotationTypeCategoryData annotationTypeCategoryData)
-
-
Method Detail
-
getNew
public static AnnotationTypeCategory getNew(DbControl dc) throws BaseException
Creates a newAnnotationTypeCategory
item.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access- Returns:
- The new
AnnotationType
item - Throws:
BaseException
- If there is an error
-
getById
public static AnnotationTypeCategory getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Get anAnnotationTypeCategory
item when you know the id.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database accessid
- The id of the item to load- Returns:
- The
AnnotationTypeCategory
item - Throws:
ItemNotFoundException
- If an item with the specified id is not foundPermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission to the itemBaseException
- If there is another error
-
getQuery
public static ItemQuery<AnnotationTypeCategory> getQuery()
Get aItemQuery
object configured to retrieveAnnotationTypeCategory
items.- Returns:
- An
ItemQuery
object
-
getData
AnnotationTypeCategoryData getData()
Description copied from class:BasicItem
Get theBasicData
object that holds all data for this item.- Overrides:
getData
in classCommonItem
-
getType
public Item getType()
Description copied from interface:Identifiable
Get the type of item represented by the object. The returned value is one of the values defined in theItem
enumeration.- Specified by:
getType
in interfaceIdentifiable
- Returns:
- A value indicating the type of item
-
getEntryDate
public Date getEntryDate()
Description copied from interface:Registered
Get the date that the item was registered in the database.- Specified by:
getEntryDate
in interfaceRegistered
- Returns:
- A date or null if this is not known
-
setEntryDate
public void setEntryDate(Date entryDate)
Description copied from interface:Registered
Set the date the entry was registered in the database. Implementations should only allow this property to be set before the item is first stored in the database. The intention of this method is to facilitate export/import of data between server.- Specified by:
setEntryDate
in interfaceRegistered
- Parameters:
entryDate
- A date or null to use today's date
-
getAnnotationTypes
public ItemQuery<AnnotationType> getAnnotationTypes(Item itemType)
Gets a query that returns the annotation types that are members of this category- Parameters:
itemType
- Optional, limit the annotation types to those that are enabled for the specified item- Returns:
- An
ItemQuery
object
-
-