|
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.util.biomaterial.ListUtil
public class ListUtil
Utility class for working with biomaterials.
Constructor Summary | |
---|---|
ListUtil()
|
Method Summary | ||
---|---|---|
static
|
addToList(BioMaterialList list,
Collection<? extends S> sources,
CollectionTransformer<S,? extends BioMaterial> transformer)
Adds items to a biomaterial list. |
|
static CollectionTransformer |
createTransformer(DbControl dc,
Item sourceItem,
Item destinationItem,
boolean pooled)
Create a transformer that can transform a collection with sourceItem :s into a collection with destinationItem :s
by following parent/child paths. |
|
static ItemQuery<? extends BioMaterial> |
getQuery(Item biomaterialType)
Get a query that returns all biomaterials that can possibly be members of this list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListUtil()
Method Detail |
---|
public static ItemQuery<? extends BioMaterial> getQuery(Item biomaterialType) throws BaseException
BioSource.getQuery()
, etc. depending on the
member type of the list.
ItemQuery
object
BaseException
- If the query could not be created and configured.public static <S extends BioMaterial> int addToList(BioMaterialList list, Collection<? extends S> sources, CollectionTransformer<S,? extends BioMaterial> transformer) throws InvalidDataException, PermissionDeniedException
BioMaterialList.getMemberType()
for the list.
list
- The list to add items tosources
- The source collection of biomaterialstransformer
- An optional transformer
InvalidDataException
- If an item is not of the correct
member type
PermissionDeniedException
- If the logged in user doesn't have
write permission for the listpublic static CollectionTransformer createTransformer(DbControl dc, Item sourceItem, Item destinationItem, boolean pooled)
sourceItem
:s into a collection with destinationItem
:s
by following parent/child paths. Both the source and destination must be
one of Item.BIOSOURCE
, Item.SAMPLE
, Item.EXTRACT
or Item.LABELEDEXTRACT
.
dc
- The DbControl the transformers should use for loading
items from the databasesourceItem
- The type of source itemsdestinationItem
- The type of destination itemspooled
- If pooled children/parents should be considered or not
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |