2.9.1: 2008-12-18

net.sf.basedb.core
Class AnnotationTypeCategory

java.lang.Object
  extended by net.sf.basedb.core.BasicItem<D>
      extended by net.sf.basedb.core.OwnedItem<D>
          extended by net.sf.basedb.core.SharedItem<D>
              extended by net.sf.basedb.core.CommonItem<AnnotationTypeCategoryData>
                  extended by net.sf.basedb.core.AnnotationTypeCategory
All Implemented Interfaces:
AccessControlled, Identifiable, Nameable, Ownable, Removable, Shareable

public class AnnotationTypeCategory
extends CommonItem<AnnotationTypeCategoryData>

Objects of this class defines an annotation type category. The categories are used to group related AnnotationType: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
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
AnnotationTypeCategory(AnnotationTypeCategoryData annotationTypeCategoryData)
           
 
Method Summary
 ItemQuery<AnnotationType> getAnnotationTypes(Item itemType)
          Gets a query that returns the annotation types that are members of this category
static AnnotationTypeCategory getById(DbControl dc, int id)
          Get an AnnotationTypeCategory item when you know the id.
static AnnotationTypeCategory getNew(DbControl dc)
          Creates a new AnnotationTypeCategory item.
static ItemQuery<AnnotationTypeCategory> getQuery()
          Get a ItemQuery object configured to retrieve AnnotationTypeCategory items.
 Item getType()
          Get the type of item represented by the object.
 
Methods inherited from class net.sf.basedb.core.CommonItem
getDescription, getName, isRemoved, setDescription, setName, setRemoved, toTransferable
 
Methods inherited from class net.sf.basedb.core.SharedItem
getItemKey, getProjectKey, initPermissions, isShared, onBeforeCommit, setItemKey, setProjectKey, toTransferable
 
Methods inherited from class net.sf.basedb.core.OwnedItem
getOwner, isOwner, setOwner, takeOwnership, toTransferable
 
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, isUsed, onAfterCommit, onAfterInsert, 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
 
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 new AnnotationTypeCategory item.

Parameters:
dc - The DbControl 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 an AnnotationTypeCategory item when you know the id.

Parameters:
dc - The DbControl which will be used for permission checking and database access
id - The id of the item to load
Returns:
The AnnotationTypeCategory item
Throws:
ItemNotFoundException - If an item with the specified id is not found
PermissionDeniedException - If the logged in user doesn't have Permission.READ permission to the item
BaseException - If there is another error

getQuery

public static ItemQuery<AnnotationTypeCategory> getQuery()
Get a ItemQuery object configured to retrieve AnnotationTypeCategory items.

Returns:
An ItemQuery object

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 the Item enumeration.

Returns:
A value indicating the type of item

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

2.9.1: 2008-12-18