|
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.ws.server.ServicesUtil
public class ServicesUtil
A utility class for common methods in the web services.
Constructor Summary | |
---|---|
ServicesUtil()
|
Method Summary | ||
---|---|---|
AnnotationInfo[] |
getAnnotations(DbControl dc,
Annotatable annotatable,
Integer[] annotationTypes,
boolean findInherited)
Load annotation values from an annotatable item. |
|
|
getConfiguredItemQuery(ItemQuery<T> query,
QueryOptions qOpt)
Put options and restriction on a item query and returns it |
|
|
listToInfo(List<? extends ToTransferable<T>> list,
Class<T> clazz)
Convert a list of objects to an array of Transferable objects
objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServicesUtil()
Method Detail |
---|
public <T extends BasicItem> ItemQuery<T> getConfiguredItemQuery(ItemQuery<T> query, QueryOptions qOpt)
T
- The kind of BasicItem the item query work with.query
- ItemQuery that should get includes and restriction.qOpt
- QueryOptions object with restrictions and includes
to put on the ItemQuery
public <T extends Transferable> T[] listToInfo(List<? extends ToTransferable<T>> list, Class<T> clazz)
Transferable
objects
objects. The objects in must be of the same type and implement the
ToTransferable
interface. The specified transferable class
must hava a public no-argument constructor.
See for example: Experiment.toTransferable(net.sf.basedb.info.ExperimentInfo)
T
- The kind of info object the items can be transfered into.list
- A list of ToTransferable
objectsclazz
- The Transferable
class that the objects in the list
are beeing converted to
public AnnotationInfo[] getAnnotations(DbControl dc, Annotatable annotatable, Integer[] annotationTypes, boolean findInherited)
dc
- The DbControl to use for database accessannotatable
- The annotatable item to load annotations fromannotationTypes
- Array of annotation type IDfindInherited
- TRUE to find inherited annotations, FALSE to only look
for primary annotations
AnnotationInfo
objects, each position corresponds
to the position with the same index in the annotationTypes array. The returned
array is always the same length as the annotationTypes array. If the annotatable
item doesn't have any annotations of a particular type, that element is null
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |