public class QueryPrescreenBitSet extends AbstractStructureQuery<BitSet,BitSet,net.idea.modbcum.q.conditions.NumberCondition>
select SQL_NO_CACHE -1 as idquery,s1.idchemical,s1.idstructure,if(s1.type_structure='NA',0,1) as selected,s1.preference as metric,null as text,-1 as idproperty FROM structure s1 LEFT JOIN structure s2 ON s1.idchemical = s2.idchemical AND (1E10*s1.preference+s1.idstructure) > (1E10*s2.preference+s2.idstructure) join ( select idchemical from fp1024 fp join sk1024 sk using(idchemical) where (bit_count('207704626823199' & sk.fp1) + bit_count('0' & sk.fp2) + bit_count('0' & sk.fp3) + bit_count('0' & sk.fp4) + bit_count('0' & sk.fp5) + bit_count('0' & sk.fp6) + bit_count('0' & sk.fp7) + bit_count('0' & sk.fp8) + bit_count('0' & sk.fp9) + bit_count('0' & sk.fp10) + bit_count('0' & sk.fp11) + bit_count('0' & sk.fp12) + bit_count('0' & sk.fp13) + bit_count('0' & sk.fp14) + bit_count('0' & sk.fp15) + bit_count('0' & sk.fp16))=15 and (bit_count('0' & fp.fp1) + bit_count('2147483648' & fp.fp2) + bit_count('8589934592' & fp.fp3) + bit_count('2305843009215799296' & fp.fp4) + bit_count('0' & fp.fp5) + bit_count('0' & fp.fp6) + bit_count('128' & fp.fp7) + bit_count('0' & fp.fp8) + bit_count('4611686018427387904' & fp.fp9) + bit_count('137438953472' & fp.fp10) + bit_count('0' & fp.fp11) + bit_count('2615635083264' & fp.fp12) + bit_count('0' & fp.fp13) + bit_count('0' & fp.fp14) + bit_count('8589934592' & fp.fp15) + bit_count('0' & fp.fp16))=13 ) a on a.idchemical=s1.idchemical where s2.idchemical is null and s1.type_structure != 'NA' limit 0,1000;
AbstractStructureQuery.FIELD_NAMES
Modifier and Type | Field and Description |
---|---|
protected boolean |
chemicalsOnly |
protected String |
fp_prescreen |
protected String |
sk_prescreen |
protected String |
sql_all |
protected String |
sql_chemical |
protected String |
sql_exact |
protected String |
sql_prescreen |
protected String |
sql_struc |
group, nanomaterial, order_descendant, where_group
condition, fieldname, id, logger, maxRecords, name, page, selected, value
Constructor and Description |
---|
QueryPrescreenBitSet() |
Modifier and Type | Method and Description |
---|---|
protected void |
bitset2params(BitSet bitset,
List<net.idea.modbcum.i.query.QueryParam> params) |
double |
calculateMetric(IStructureRecord item) |
List<net.idea.modbcum.i.query.QueryParam> |
getParameters() |
String |
getSQL() |
boolean |
isChemicalsOnly() |
boolean |
isPrescreen() |
void |
setChemicalsOnly(boolean chemicalsOnly) |
String |
toString() |
getObject, isNanomaterial, isOrder_descendant, isPreferredStructure, retrieveMetric, retrieveStrucType, retrieveValue, setNanomaterial, setOrder_descendant
getCategory, getCondition, getFieldname, getId, getKey, getName, getPage, getPageSize, getValue, isSelected, setCondition, setFieldname, setId, setName, setPage, setPageSize, setSelected, setValue, stringify, supportsPaging, test
protected String sql_struc
protected String sql_chemical
protected String sk_prescreen
protected String fp_prescreen
protected String sql_all
protected String sql_prescreen
protected String sql_exact
protected boolean chemicalsOnly
public boolean isChemicalsOnly()
isChemicalsOnly
in class AbstractStructureQuery<BitSet,BitSet,net.idea.modbcum.q.conditions.NumberCondition>
public void setChemicalsOnly(boolean chemicalsOnly)
setChemicalsOnly
in class AbstractStructureQuery<BitSet,BitSet,net.idea.modbcum.q.conditions.NumberCondition>
public String getSQL() throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitException
protected void bitset2params(BitSet bitset, List<net.idea.modbcum.i.query.QueryParam> params) throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitException
public List<net.idea.modbcum.i.query.QueryParam> getParameters() throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitException
public String toString()
toString
in class AbstractQuery<BitSet,BitSet,net.idea.modbcum.q.conditions.NumberCondition,IStructureRecord>
public double calculateMetric(IStructureRecord item)
calculateMetric
in interface net.idea.modbcum.i.IQueryRetrieval<IStructureRecord>
calculateMetric
in class AbstractStructureQuery<BitSet,BitSet,net.idea.modbcum.q.conditions.NumberCondition>
public boolean isPrescreen()
isPrescreen
in interface net.idea.modbcum.i.IQueryRetrieval<IStructureRecord>
isPrescreen
in class AbstractStructureQuery<BitSet,BitSet,net.idea.modbcum.q.conditions.NumberCondition>
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.