public class Tag extends AnnotatedItem<TagData> implements Registered, Subtypable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BARCODE
The ID for the BARCODE tag type.
|
static java.lang.String |
LABEL
The ID for the LABEL tag type.
|
static Item |
TYPE
The type of item represented by this class.
|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Modifier and Type | Method and Description |
---|---|
java.util.Set<Annotatable> |
getAnnotatableParents()
Get all parents objects which are annotatable and the logged in
user has read permission to.
|
static Tag |
getById(DbControl dc,
int id)
Get a
Tag item when you know the id. |
java.util.Date |
getEntryDate()
Get the date that the item was registered in the database.
|
ItemSubtype |
getItemSubtype()
Get the subtype of the item.
|
static Tag |
getNew(DbControl dc)
Create a new
Tag item. |
static ItemQuery<Tag> |
getQuery()
Get a query that returns tags.
|
Item |
getType()
Get the type of item represented by the object.
|
java.util.Set<ItemProxy> |
getUsingItems()
Get all:
Extract :s marked with this tag
|
boolean |
isUsed()
Check if:
Some
Extract :s are marked with this tag
|
void |
setItemSubtype(ItemSubtype subtype)
Set the subtype on the item.
|
getAnnotationSet, getProtocol, isAnnotated, removeAnnotations, toTransferable
getDescription, getName, isRemoved, setDescription, setName, setRemoved, toTransferable
getItemKey, getProjectKey, initPermissions, isShared, onBeforeCommit, setItemKey, setProjectKey, toTransferable
getOwner, isOwner, setOwner, takeOwnership, toTransferable
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getVersion
checkPermission, getPermissions, hasPermission
getOwner, isOwner, setOwner, takeOwnership
public static final Item TYPE
public static final java.lang.String LABEL
public static final java.lang.String BARCODE
Tag(TagData data)
public static Tag getNew(DbControl dc) throws BaseException
Tag
item.dc
- The DbControl
which will be used for
permission checking and database accessLabel
itemBaseException
- If there is an errorpublic static Tag getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Tag
item 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 loadTag
itemItemNotFoundException
- If an item with the specified
id is not foundPermissionDeniedException
- If the logged in user doesn't
have Permission.READ
permission to the itemBaseException
- If there is another errorpublic static ItemQuery<Tag> getQuery()
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public java.util.Date getEntryDate()
Registered
getEntryDate
in interface Registered
public java.util.Set<Annotatable> getAnnotatableParents()
Annotatable
Subtypable
item that has a subtype
with the ItemSubtype.getPushAnnotations()
flag set.getAnnotatableParents
in interface Annotatable
public ItemSubtype getItemSubtype()
Subtypable
getItemSubtype
in interface Subtypable
SubtypableRelatedItems
public void setItemSubtype(ItemSubtype subtype)
Subtypable
setItemSubtype
in interface Subtypable
subtype
- A subtype or nullItemSubtype.setOnItem(Subtypable)
public boolean isUsed() throws BaseException
Extract
:s are marked with this tag
isUsed
in class BasicItem<TagData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public java.util.Set<ItemProxy> getUsingItems()
Extract
:s marked with this tag
getUsingItems
in class BasicItem<TagData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)