|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BasicItem<D> net.sf.basedb.core.OwnedItem<D> net.sf.basedb.core.SharedItem<D> net.sf.basedb.core.CommonItem<PlateTypeData> net.sf.basedb.core.PlateType
public class PlateType
This class represents plate types, which is a name, description, geometry and a list of event types.
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 | |
---|---|
PlateType(PlateTypeData plateTypeData)
|
Method Summary | |
---|---|
static PlateType |
getById(DbControl dc,
int id)
Get a PlateType item when you know the id. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
ItemQuery<PlateEventType> |
getEventTypes()
Get a query that returns all event types for this plate type. |
static PlateType |
getNew(DbControl dc,
PlateGeometry plateGeometry)
Create a new PlateType item. |
PlateGeometry |
getPlateGeometry()
Get the PlateGeometry of this plate type. |
ItemQuery<Plate> |
getPlates()
Get a query that returns all plates of this plate type. |
static ItemQuery<PlateType> |
getQuery()
Get a query that returns plate types. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: Plate :s created from this plate type
|
boolean |
isUsed()
Check if: Any Plate :s of this type exists
|
PlateEventType |
newEventType()
Create a new event type for this plate type. |
Plate |
newPlate()
Create a new plate of this plate type. |
private void |
setPlateGeometry(PlateGeometry plateGeometry)
Set the plate geometry of this plate type. |
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, 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.PLATETYPE
,
getType()
Constructor Detail |
---|
PlateType(PlateTypeData plateTypeData)
Method Detail |
---|
public static PlateType getNew(DbControl dc, PlateGeometry plateGeometry) throws BaseException
PlateType
item.
dc
- The DbControl
which will be used for
permission checking and database accessplateGeometry
- The geometry of the new plate type
PlateType
item
PermissionDeniedException
- If the loggged in user
doesn't have use permission for the geometry
InvalidDataException
- If the geometry is null
BaseException
- If there is an errorpublic static PlateType getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
PlateType
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 load
PlateType
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<PlateType> getQuery()
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
public Date getEntryDate()
Registered
getEntryDate
in interface Registered
public boolean isUsed() throws BaseException
Plate
:s of this type exists
isUsed
in class BasicItem<PlateTypeData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
Plate
:s created from this plate type
getUsingItems
in class BasicItem<PlateTypeData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public PlateGeometry getPlateGeometry() throws PermissionDeniedException, BaseException
PlateGeometry
of this plate type.
PlateGeometry
item
PermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the plate geometry
BaseException
- If there is another errorprivate void setPlateGeometry(PlateGeometry plateGeometry) throws PermissionDeniedException, InvalidDataException
PermissionDeniedException
- If the logged in user
doesn't have use permission for the geometry
InvalidDataException
- If the geometry is nullpublic PlateEventType newEventType() throws PermissionDeniedException, BaseException
PlateEventType
item
PermissionDeniedException
- If the logged in user
doesn't have write permission for this plate type
BaseException
- If there is another errorpublic ItemQuery<PlateEventType> getEventTypes()
ItemQuery
objectpublic Plate newPlate() throws PermissionDeniedException, BaseException
Plate
item
PermissionDeniedException
- If the logged in user
doesn't have use permission for this plate type
BaseException
- If there is another errorpublic ItemQuery<Plate> getPlates()
ItemQuery
object
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |