Package net.sf.basedb.core
Class DataCubeColumn
- java.lang.Object
-
- net.sf.basedb.core.BasicItem
-
- net.sf.basedb.core.ChildItem
-
- net.sf.basedb.core.DataCubeColumn
-
- All Implemented Interfaces:
AccessControlled
,Identifiable
public class DataCubeColumn extends ChildItem
Represents the column coordinate in a data cube. ABioAssay
must have a link to an item of this type. It is possible for more than one bioassay to link to the same column. Actually, if twoBioAssaySet
:s, one which is the child of the other, are in the same data cube, a bioassay must link to the same column as the parent bioassay.- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2015-04-17 14:02:22 +0200 (fr, 17 apr 2015) $
-
-
Constructor Summary
Constructors Constructor Description DataCubeColumn(DataCubeColumnData data)
Creates a new data cube item from the given data.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DataCubeColumn
getById(DbControl dc, int id)
Get aDataCubeColumn
item when you know the id.short
getColumnNo()
Get the number of this column.(package private) DataCubeColumnData
getData()
Get theBasicData
object that holds all data for this item.DataCube
getDataCube()
Get the data cube this layer belongs to.short
getDataCubeNo()
Get the number of the data cube this layer belongs to.(package private) static DataCubeColumn
getNew(DbControl dc, DataCube cube)
Create a newDataCubeColumn
item.(package private) Permission
getPermissionForWriteDeleteAndCreate()
USE permission is enough to be able to manage data cubes.(package private) SharedData
getSharedParent()
Get the experiment.Item
getType()
Get the type of item represented by the object.(package private) VirtualDb
getVirtualDb()
Get the virtual database this column belongs to.(package private) void
initPermissions(int granted, int denied)
Deny DELETE permission.private void
setColumnNo(short columnNo)
private void
setDataCube(DataCube cube)
Set the experiment.-
Methods inherited from class net.sf.basedb.core.ChildItem
getPermissionForUse, getPluginPermissions
-
Methods inherited from class net.sf.basedb.core.BasicItem
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, validate
-
-
-
-
Field Detail
-
TYPE
public static final Item TYPE
The type of item represented by this class.- See Also:
Item.DATACUBECOLUMN
,getType()
-
-
Constructor Detail
-
DataCubeColumn
DataCubeColumn(DataCubeColumnData data)
Creates a new data cube item from the given data.- Parameters:
data
- the data
-
-
Method Detail
-
getNew
static DataCubeColumn getNew(DbControl dc, DataCube cube) throws BaseException
Create a newDataCubeColumn
item.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access.cube
- The cube the new column is located in- Returns:
- The new
DataCubeColumn
item - Throws:
BaseException
- If there is an error
-
getById
public static DataCubeColumn getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Get aDataCubeColumn
item when you know the id.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access.id
- The id of the item to load- Returns:
- The
DataCubeColumn
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
-
getData
DataCubeColumnData getData()
Description copied from class:BasicItem
Get theBasicData
object that holds all data for this item.
-
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.- Returns:
- A value indicating the type of item
-
initPermissions
void initPermissions(int granted, int denied) throws BaseException
Deny DELETE permission. Columns are automatically deleted when the data cube is deleted (by Hibernate cascade).- Overrides:
initPermissions
in classChildItem
- Parameters:
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclass- Throws:
BaseException
- If the permissions couldn't be initialised
-
getSharedParent
SharedData getSharedParent()
Get the experiment.- Specified by:
getSharedParent
in classChildItem
- Returns:
- The parent item
-
getPermissionForWriteDeleteAndCreate
Permission getPermissionForWriteDeleteAndCreate()
USE permission is enough to be able to manage data cubes.- Overrides:
getPermissionForWriteDeleteAndCreate
in classChildItem
-
getDataCube
public DataCube getDataCube() throws PermissionDeniedException, BaseException
Get the data cube this layer belongs to.- Returns:
- A
DataCube
object - Throws:
PermissionDeniedException
- If the logged in user doesn't have read permission to the itemBaseException
- If there is another error
-
setDataCube
private void setDataCube(DataCube cube) throws PermissionDeniedException, InvalidDataException
Set the experiment. This cannot be changed after the dynamic tables has been created.
-
getDataCubeNo
public short getDataCubeNo()
Get the number of the data cube this layer belongs to.
-
getColumnNo
public short getColumnNo()
Get the number of this column.
-
setColumnNo
private void setColumnNo(short columnNo)
-
getVirtualDb
VirtualDb getVirtualDb()
Get the virtual database this column belongs to.
-
-