|
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.BioAssaySetUtil
public class BioAssaySetUtil
This is a utility class for BioAssaySet
.
Constructor Summary | |
---|---|
BioAssaySetUtil()
|
Method Summary | |
---|---|
static Expression |
createJepExpression(DbControl dc,
BioAssaySet bioAssaySet,
String formula,
boolean allowRawIfMultipleMappings)
Deprecated. In 2.15, use createJepExpression(DbControl, String, DynamicQuery)
instead. The 'allowRawIfMultipleMappings' parameter is replaced with an
option on the spot query: DynamicSpotQuery.setDisableRawJoinOnMergedData(boolean)
(it has no meaning on other queries) |
static Expression |
createJepExpression(DbControl dc,
String formula,
DynamicQuery query)
Parse a JEP expression and create a restrictions that is suitable to be used in a dynamic query. |
static Restriction |
createJepRestriction(DbControl dc,
BioAssaySet bioAssaySet,
String formula,
boolean allowRawIfMultipleMappings)
Deprecated. In 2.15, use createJepRestriction(DbControl, String, DynamicQuery)
instead. The 'allowRawIfMultipleMappings' parameter is replaced with an
option on the spot query: DynamicSpotQuery.setDisableRawJoinOnMergedData(boolean)
(it has no meaning on other queries) |
static Restriction |
createJepRestriction(DbControl dc,
String formula,
DynamicQuery query)
Parse a JEP expression and create a restrictions that is suitable to be used in a dynamic query. |
static Set<?> |
getAnnotationValues(DbControl dc,
BioAssay bioAssay,
AnnotationType annotationType)
Deprecated. In BASE 2.14 due to performance problems, use getAnnotationValues(DbControl, SnapshotManager, BioAssay, AnnotationType)
instead |
static Set<?> |
getAnnotationValues(DbControl dc,
SnapshotManager snapshotManager,
BioAssay bioAssay,
AnnotationType annotationType)
Find the annotation values for a given annotation type on a bioassay. |
static Set<Object> |
getParentProperties(DbControl dc,
BioAssay bioAssay,
Metadata.PropertyPath<RawBioAssay,?> property)
Find the values of parent properties for a given bioassay. |
static Set<Object> |
getParentProperties(DbControl dc,
BioAssay bioAssay,
String property)
Deprecated. In 2.15, use getParentProperties(DbControl, BioAssay, Metadata.PropertyPath) instead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BioAssaySetUtil()
Method Detail |
---|
public static Set<?> getAnnotationValues(DbControl dc, BioAssay bioAssay, AnnotationType annotationType)
getAnnotationValues(DbControl, SnapshotManager, BioAssay, AnnotationType)
instead
Since a bioassay may have more than one parent raw bioassay and each annotation may have multiple values it is possible that the set contains multiple values. Each value is only present once regardless of how many times it appears in the annotations.
dc
- The DbControl for database accessbioAssay
- The bioassay to get the annotations forannotationType
- The annotation type of the annotations
public static Set<?> getAnnotationValues(DbControl dc, SnapshotManager snapshotManager, BioAssay bioAssay, AnnotationType annotationType)
Since a bioassay may have more than one parent raw bioassay and each annotation may have multiple values it is possible that the set contains multiple values. Each value is only present once regardless of how many times it appears in the annotations.
dc
- The DbControl for database accesssnapshotManager
- A snapshot manager that is used for loading the annotations
from either the database or the file cache (if null, an internal, non-reusable
snapshot manager is used)bioAssay
- The bioassay to get the annotations forannotationType
- The annotation type of the annotations
@Deprecated public static Set<Object> getParentProperties(DbControl dc, BioAssay bioAssay, String property)
getParentProperties(DbControl, BioAssay, Metadata.PropertyPath)
instead
public static Set<Object> getParentProperties(DbControl dc, BioAssay bioAssay, Metadata.PropertyPath<RawBioAssay,?> property)
Metadata.PropertyPath
object to find the value of the given property for that raw bioassay.
Since a bioassay may have more than one parent raw bioassay and it is possible that the set contains multiple values. Each value is only present once regardless of how many times it appears among the parents.
Examples of property paths:
dc
- The DbControl for database accessbioAssay
- The bioassay to get the annotations forproperty
- The property to get the value for
@Deprecated public static Restriction createJepRestriction(DbControl dc, BioAssaySet bioAssaySet, String formula, boolean allowRawIfMultipleMappings) throws InvalidDataException, BaseException
createJepRestriction(DbControl, String, DynamicQuery)
instead. The 'allowRawIfMultipleMappings' parameter is replaced with an
option on the spot query: DynamicSpotQuery.setDisableRawJoinOnMergedData(boolean)
(it has no meaning on other queries)
InvalidDataException
BaseException
public static Restriction createJepRestriction(DbControl dc, String formula, DynamicQuery query)
Jep.getFunctions()
) this method can use additional
functions. The extra functions are defined by the query. See
DynamicQuery.getJepFunctions(DbControl, boolean)
and it's subclasses
for detailed information. Here are some useful functions:
createJepExpression(DbControl,
String, DynamicQuery)
method
dc
- DbControl to use when accessing the database.formula
- The formula to parse. Must not be null.query
- The query where the restriction will be used, it is not
recommended to use the expression in a different query since it may
generate incorrect SQL
InvalidDataException
- If any of required parameters are null.
BaseException
- If creating the restriction fails.Jep
@Deprecated public static Expression createJepExpression(DbControl dc, BioAssaySet bioAssaySet, String formula, boolean allowRawIfMultipleMappings) throws InvalidDataException, BaseException
createJepExpression(DbControl, String, DynamicQuery)
instead. The 'allowRawIfMultipleMappings' parameter is replaced with an
option on the spot query: DynamicSpotQuery.setDisableRawJoinOnMergedData(boolean)
(it has no meaning on other queries)
InvalidDataException
BaseException
public static Expression createJepExpression(DbControl dc, String formula, DynamicQuery query)
Jep.getFunctions()
) this method can use additional
functions. The extra functions are defined by the query. See
DynamicQuery.getJepFunctions(DbControl, boolean)
and it's subclasses
for detailed information. Here are some useful functions:
DynamicSpotQuery.setDisableRawJoinOnMergedData(boolean)
flag controls this.
ReporterData
in the
specified ReporterList
(numeric or external ID)
ExtraValue
(numeric ID or the external ID of the ExtraValueType
)
dc
- The DbControl to use when accessing the database.formula
- The formula that should be parsed. Must not be null.query
- The query where the expression will be used, it is not
recommended to use the expression in a different query since it may
generate incorrect SQL
InvalidDataException
- If any of required parameters are null.
BaseException
- If creating the expression fails.Jep
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |