|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.BasicItem<D>
net.sf.basedb.core.OwnedItem<D>
net.sf.basedb.core.SharedItem<D>
net.sf.basedb.core.CommonItem<ReporterCloneTemplateData>
net.sf.basedb.core.ReporterCloneTemplate
public class ReporterCloneTemplate
A reporter clone template is a definition of which reporter properties/annotations
that should be cloned to a per-experiment table in the dynamic database. The
cloning operation is initiated with Experiment.getReporterCloneBatcher(DbControl)
.
The reporter internal and external id
are always cloned and should not be part of the template. The cloning operation
also creates a locked copy of the template, so that it is possible to make modifications
to the original template without affecting the cloned data.
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 | |
---|---|
ReporterCloneTemplate(ReporterCloneTemplateData data)
|
Method Summary | |
---|---|
(package private) void |
addBytes(long bytes)
|
void |
addClonableProperty(ClonableProperty property)
Add a clonable property to this template. |
(package private) static ReporterCloneTemplateData |
createAllCopy(String name)
|
(package private) ReporterCloneTemplateData |
createLockedCopy()
Create a deep clone of this template. |
static ReporterCloneTemplate |
getById(DbControl dc,
int id)
Get a reporter clone template item when you know the id. |
long |
getBytes()
Get the number of bytes the cloned reporter information use in the database. |
List<ClonableProperty> |
getClonableProperties()
Get a list with all clonable properties in this template. |
(package private) static List<ClonableProperty> |
getClonableProperties(ReporterCloneTemplateData template)
|
ClonableProperty |
getClonableProperty(String propertyName)
Get information about a clonable property that is included in this template. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
static ReporterCloneTemplate |
getNew(DbControl dc)
Create a new reporter clone template item. |
(package private) PluginPermission |
getPluginPermissions()
|
static ItemQuery<ReporterCloneTemplate> |
getQuery()
Get a query that returns reporter clone templates. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: Experiment that is using this template |
boolean |
hasClonableProperty(String propertyName)
Check if this template contains a clonable property with the given name. |
(package private) void |
initPermissions(int granted,
int denied)
Locked templates are READ-able by all, and everything else is denied. |
boolean |
isLocked()
If the template is locked it means that it is used by an experiment and can't be modified or deleted. |
boolean |
isUsed()
Check if: An experiment/virtualdb is using this template |
void |
removeClonableProperty(String propertyName)
Remove the property with the given name from this template |
void |
setDescription(String description)
Allow the description to be changed with RESTRICTED_WRITE permission. |
Methods inherited from class net.sf.basedb.core.CommonItem |
---|
getDescription, getName, isRemoved, setName, setRemoved, toTransferable |
Methods inherited from class net.sf.basedb.core.SharedItem |
---|
getItemKey, getProjectKey, 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, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, 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 |
---|
public static final Item TYPE
Item.REPORTERCLONETEMPLATE
,
getType()
Constructor Detail |
---|
ReporterCloneTemplate(ReporterCloneTemplateData data)
Method Detail |
---|
public static ReporterCloneTemplate getNew(DbControl dc) throws BaseException
dc
- The DbControl
which will be used for
permission checking and database access
ReporterCloneTemplate
item
BaseException
- If there is an errorpublic static ReporterCloneTemplate getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
dc
- The DbControl
which will be used for
permission checking and database access.id
- The id of the item to load
ReporterCloneTemplate
item
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 errorpublic static ItemQuery<ReporterCloneTemplate> getQuery()
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
void initPermissions(int granted, int denied) throws BaseException
initPermissions
in class SharedItem<ReporterCloneTemplateData>
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclass
BaseException
- If the permissions couldn't be initialisedPluginPermission getPluginPermissions()
getPluginPermissions
in class BasicItem<ReporterCloneTemplateData>
public boolean isUsed() throws BaseException
isUsed
in class BasicItem<ReporterCloneTemplateData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
getUsingItems
in class BasicItem<ReporterCloneTemplateData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public Date getEntryDate()
Registered
getEntryDate
in interface Registered
public void setDescription(String description) throws PermissionDeniedException, InvalidDataException
setDescription
in interface Nameable
setDescription
in class CommonItem<ReporterCloneTemplateData>
description
- 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 boolean isLocked()
public long getBytes()
void addBytes(long bytes)
public void addClonableProperty(ClonableProperty property)
property
- Information about the property to include in the
template (null is not allowed)public void removeClonableProperty(String propertyName)
propertyName
- The name of a property (null is not allowed)public ClonableProperty getClonableProperty(String propertyName)
propertyName
- The name of a property
public boolean hasClonableProperty(String propertyName)
propertyName
- The property name to check
public List<ClonableProperty> getClonableProperties()
ReporterCloneTemplateData createLockedCopy()
static ReporterCloneTemplateData createAllCopy(String name)
static List<ClonableProperty> getClonableProperties(ReporterCloneTemplateData template)
|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |