|
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.Values
final class Values
Utility class to handle the conversion between data objects and item objects. Only item objects are safe to be exposed to client applications and plugins, but the database contains data objects.
Constructor Summary | |
---|---|
Values()
|
Method Summary | |
---|---|
(package private) static Object |
getDataValue(Object value)
Convert an item values to a data value. |
(package private) static List<Object> |
getDataValues(List<?> itemValues)
Convert a list of item values to data values. |
(package private) static Object |
getItemValue(DbControl dc,
Object value)
Convert a a data value to a item value. |
(package private) static List<Object> |
getItemValues(DbControl dc,
List<?> dataValues)
Convert a list of data values to item values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
Values()
Method Detail |
---|
static Object getItemValue(DbControl dc, Object value) throws PermissionDeniedException, BaseException
BasicData
objects will be converted to their correspoding
BasicItem
objects, Date
:s will be copied
since they are mutable, etc. This method is needed for
example by the Annotation.getValues()
method to make
sure that the database can't be modified without the proper permissions.
Objects implementing the BatchableData
interface are
not converted since these objects are safe for use with clients
if they are evicted from the Hibernate session.
dc
- The DbControl to use for item conversion and evictionvalue
- The value to convert
PermissionDeniedException
- If the value is an item
which the logged in user doesn't have read permission for
BaseException
- If there is another errorstatic List<Object> getItemValues(DbControl dc, List<?> dataValues) throws PermissionDeniedException, ItemNotFoundException, BaseException
PermissionDeniedException
ItemNotFoundException
BaseException
getItemValue(DbControl, Object)
static Object getDataValue(Object value)
BasicItem
objects will be converted to their correspoding
BasicData
objects, Date
:s will be copied
since they are mutable, etc.
value
- The value to convertstatic List<Object> getDataValues(List<?> itemValues)
getDataValue(Object)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |