本文整理了Java中org.apache.oodt.cas.filemgr.structs.Query.<init>
方法的一些代码示例,展示了Query.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.<init>
方法的具体详情如下:
包路径:org.apache.oodt.cas.filemgr.structs.Query
类名称:Query
方法名:<init>
[英]Default Constructor
.
[中]缺省构造
.
代码示例来源:origin: apache/oodt
public static Query getQuery(AvroQuery avroQuery){
List<QueryCriteria> queryCriterias = new ArrayList<QueryCriteria>();
for (AvroQueryCriteria qc : avroQuery.getCriteria()){
queryCriterias.add(getQueryCriteria(qc));
}
return new Query(queryCriterias);
}
代码示例来源:origin: apache/oodt
public ProductPage getFirstPage(ProductType type) {
Query query = new Query();
ProductPage firstPage = null;
try {
firstPage = pagedQuery(query, type, 1);
} catch (CatalogException e) {
LOG.log(Level.WARNING, "Exception getting first page: Message: "
+ e.getMessage());
}
return firstPage;
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
@Override
public ProductPage getFirstPage(ProductType type) {
try {
return this.pagedQuery(new Query(), type, 1);
} catch(CatalogException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
public static Query getQueryFromXmlRpc(Map<String, Object> queryHash) {
Query query = new Query();
@SuppressWarnings("unchecked")
List<QueryCriteria> criteria = getQueryCriteriaListFromXmlRpc((Vector<Map<String, Object>>) queryHash
.get("criteria"));
query.setCriteria(criteria);
return query;
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
public ProductPage getFirstPage(ProductType type) {
Query query = new Query();
ProductPage firstPage = null;
try {
firstPage = pagedQuery(query, type, 1);
} catch (CatalogException e) {
LOG.log(Level.WARNING, "Exception getting first page: Message: "
+ e.getMessage());
}
return firstPage;
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
public ProductPage getFirstPage(ProductType type) {
Query query = new Query();
ProductPage firstPage = null;
try {
firstPage = pagedQuery(query, type, 1);
} catch (CatalogException e) {
LOG.log(Level.WARNING,
"Exception getting first page: Message: " + e.getMessage());
}
return firstPage;
}
代码示例来源:origin: org.apache.oodt/pcs-core
public Query buildQuery() {
Query query = new Query();
TermQueryCriteria crit = new TermQueryCriteria(PRODUCT_NAME, this.prodName);
query.addCriterion(crit);
return query;
}
代码示例来源:origin: org.apache.oodt/pcs-core
public Query buildQuery() {
Query query = new Query();
TermQueryCriteria crit = new TermQueryCriteria(INPUT_FILES,
this.origInputFile);
query.addCriterion(crit);
return query;
}
代码示例来源:origin: org.apache.oodt/pcs-core
public Query buildQuery() {
Query query = new Query();
TermQueryCriteria crit = new TermQueryCriteria(FILENAME, this.fileName);
query.addCriterion(crit);
return query;
}
代码示例来源:origin: apache/oodt
public Query buildQuery() {
Query query = new Query();
TermQueryCriteria crit = new TermQueryCriteria(JOB_ID, this.jobId);
query.addCriterion(crit);
return query;
}
代码示例来源:origin: org.apache.oodt/pcs-core
public Query buildQuery() {
Query query = new Query();
TermQueryCriteria crit = new TermQueryCriteria(JOB_ID, this.jobId);
query.addCriterion(crit);
return query;
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
@Override
public ProductPage getPrevPage(ProductType type, ProductPage currentPage) {
int prevPageNumber = currentPage.getPageNum()-1;
if (prevPageNumber<=0) {
throw new RuntimeException("Invalid previous page number: " + prevPageNumber);
}
try {
return this.pagedQuery(new Query(), type, prevPageNumber);
} catch(CatalogException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.oodt/pcs-core
public Query buildQuery() {
Query query = new Query();
TermQueryCriteria crit = new TermQueryCriteria(OUTPUT_FILES,
this.origOutputFile);
query.addCriterion(crit);
return query;
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
@Override
public ProductPage getNextPage(ProductType type, ProductPage currentPage) {
int nextPageNumber = currentPage.getPageNum()+1;
if (nextPageNumber>currentPage.getTotalPages()) {
throw new RuntimeException("Invalid next page number: " + nextPageNumber);
}
try {
return this.pagedQuery(new Query(), type, currentPage.getPageNum()+1);
} catch(CatalogException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
代码示例来源:origin: apache/oodt
@Override
public ProductPage getNextPage(ProductType type, ProductPage currentPage) {
int nextPageNumber = currentPage.getPageNum()+1;
if (nextPageNumber>currentPage.getTotalPages()) {
throw new RuntimeException("Invalid next page number: " + nextPageNumber);
}
try {
return this.pagedQuery(new Query(), type, currentPage.getPageNum()+1);
} catch(CatalogException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
public ProductPage getLastProductPage(ProductType type) {
ProductPage lastPage = null;
ProductPage firstPage = getFirstPage(type);
Query query = new Query();
try {
lastPage = pagedQuery(query, type, firstPage.getTotalPages());
} catch (CatalogException e) {
LOG.log(Level.WARNING, "Exception getting last page: Message: "
+ e.getMessage());
}
return lastPage;
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
public ProductPage getLastProductPage(ProductType type) {
ProductPage lastPage = null;
ProductPage firstPage = getFirstPage(type);
Query query = new Query();
try {
lastPage = pagedQuery(query, type, firstPage.getTotalPages());
} catch (CatalogException e) {
LOG.log(Level.WARNING,
"Exception getting last page: Message: " + e.getMessage());
}
return lastPage;
}
代码示例来源:origin: apache/oodt
@Override
public ProductPage getLastProductPage(ProductType type) {
try {
// query for total number of products of this type
int numTotalResults = this.getNumProducts(type);
// compute last page number
int numOfPages = PaginationUtils.getTotalPage(numTotalResults, Parameters.PAGE_SIZE);
// request last page
return pagedQuery(new Query(), type, numOfPages);
} catch(CatalogException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.oodt/cas-filemgr
@Override
public ProductPage getLastProductPage(ProductType type) {
try {
// query for total number of products of this type
int numTotalResults = this.getNumProducts(type);
// compute last page number
int numOfPages = PaginationUtils.getTotalPage(numTotalResults, Parameters.PAGE_SIZE);
// request last page
return pagedQuery(new Query(), type, numOfPages);
} catch(CatalogException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
代码示例来源:origin: apache/oodt
public ProductPage getLastProductPage(ProductType type) {
ProductPage lastPage = null;
ProductPage firstPage = getFirstPage(type);
Query query = new Query();
try {
lastPage = pagedQuery(query, type, firstPage.getTotalPages());
} catch (CatalogException e) {
LOG.log(Level.WARNING, "Exception getting last page: Message: "
+ e.getMessage());
}
return lastPage;
}
内容来源于网络,如有侵权,请联系作者删除!