org.apache.oodt.cas.filemgr.structs.Query.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(301)

本文整理了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>

Query.<init>介绍

[英]Default Constructor
.
[中]缺省构造
.

代码示例

代码示例来源:origin: apache/oodt

  1. public static Query getQuery(AvroQuery avroQuery){
  2. List<QueryCriteria> queryCriterias = new ArrayList<QueryCriteria>();
  3. for (AvroQueryCriteria qc : avroQuery.getCriteria()){
  4. queryCriterias.add(getQueryCriteria(qc));
  5. }
  6. return new Query(queryCriterias);
  7. }

代码示例来源:origin: apache/oodt

  1. public ProductPage getFirstPage(ProductType type) {
  2. Query query = new Query();
  3. ProductPage firstPage = null;
  4. try {
  5. firstPage = pagedQuery(query, type, 1);
  6. } catch (CatalogException e) {
  7. LOG.log(Level.WARNING, "Exception getting first page: Message: "
  8. + e.getMessage());
  9. }
  10. return firstPage;
  11. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. @Override
  2. public ProductPage getFirstPage(ProductType type) {
  3. try {
  4. return this.pagedQuery(new Query(), type, 1);
  5. } catch(CatalogException e) {
  6. throw new RuntimeException(e.getMessage(), e);
  7. }
  8. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. public static Query getQueryFromXmlRpc(Map<String, Object> queryHash) {
  2. Query query = new Query();
  3. @SuppressWarnings("unchecked")
  4. List<QueryCriteria> criteria = getQueryCriteriaListFromXmlRpc((Vector<Map<String, Object>>) queryHash
  5. .get("criteria"));
  6. query.setCriteria(criteria);
  7. return query;
  8. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. public ProductPage getFirstPage(ProductType type) {
  2. Query query = new Query();
  3. ProductPage firstPage = null;
  4. try {
  5. firstPage = pagedQuery(query, type, 1);
  6. } catch (CatalogException e) {
  7. LOG.log(Level.WARNING, "Exception getting first page: Message: "
  8. + e.getMessage());
  9. }
  10. return firstPage;
  11. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. public ProductPage getFirstPage(ProductType type) {
  2. Query query = new Query();
  3. ProductPage firstPage = null;
  4. try {
  5. firstPage = pagedQuery(query, type, 1);
  6. } catch (CatalogException e) {
  7. LOG.log(Level.WARNING,
  8. "Exception getting first page: Message: " + e.getMessage());
  9. }
  10. return firstPage;
  11. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(PRODUCT_NAME, this.prodName);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(INPUT_FILES,
  4. this.origInputFile);
  5. query.addCriterion(crit);
  6. return query;
  7. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(FILENAME, this.fileName);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: apache/oodt

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(JOB_ID, this.jobId);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(JOB_ID, this.jobId);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. @Override
  2. public ProductPage getPrevPage(ProductType type, ProductPage currentPage) {
  3. int prevPageNumber = currentPage.getPageNum()-1;
  4. if (prevPageNumber<=0) {
  5. throw new RuntimeException("Invalid previous page number: " + prevPageNumber);
  6. }
  7. try {
  8. return this.pagedQuery(new Query(), type, prevPageNumber);
  9. } catch(CatalogException e) {
  10. throw new RuntimeException(e.getMessage(), e);
  11. }
  12. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(OUTPUT_FILES,
  4. this.origOutputFile);
  5. query.addCriterion(crit);
  6. return query;
  7. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. @Override
  2. public ProductPage getNextPage(ProductType type, ProductPage currentPage) {
  3. int nextPageNumber = currentPage.getPageNum()+1;
  4. if (nextPageNumber>currentPage.getTotalPages()) {
  5. throw new RuntimeException("Invalid next page number: " + nextPageNumber);
  6. }
  7. try {
  8. return this.pagedQuery(new Query(), type, currentPage.getPageNum()+1);
  9. } catch(CatalogException e) {
  10. throw new RuntimeException(e.getMessage(), e);
  11. }
  12. }

代码示例来源:origin: apache/oodt

  1. @Override
  2. public ProductPage getNextPage(ProductType type, ProductPage currentPage) {
  3. int nextPageNumber = currentPage.getPageNum()+1;
  4. if (nextPageNumber>currentPage.getTotalPages()) {
  5. throw new RuntimeException("Invalid next page number: " + nextPageNumber);
  6. }
  7. try {
  8. return this.pagedQuery(new Query(), type, currentPage.getPageNum()+1);
  9. } catch(CatalogException e) {
  10. throw new RuntimeException(e.getMessage(), e);
  11. }
  12. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. public ProductPage getLastProductPage(ProductType type) {
  2. ProductPage lastPage = null;
  3. ProductPage firstPage = getFirstPage(type);
  4. Query query = new Query();
  5. try {
  6. lastPage = pagedQuery(query, type, firstPage.getTotalPages());
  7. } catch (CatalogException e) {
  8. LOG.log(Level.WARNING, "Exception getting last page: Message: "
  9. + e.getMessage());
  10. }
  11. return lastPage;
  12. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. public ProductPage getLastProductPage(ProductType type) {
  2. ProductPage lastPage = null;
  3. ProductPage firstPage = getFirstPage(type);
  4. Query query = new Query();
  5. try {
  6. lastPage = pagedQuery(query, type, firstPage.getTotalPages());
  7. } catch (CatalogException e) {
  8. LOG.log(Level.WARNING,
  9. "Exception getting last page: Message: " + e.getMessage());
  10. }
  11. return lastPage;
  12. }

代码示例来源:origin: apache/oodt

  1. @Override
  2. public ProductPage getLastProductPage(ProductType type) {
  3. try {
  4. // query for total number of products of this type
  5. int numTotalResults = this.getNumProducts(type);
  6. // compute last page number
  7. int numOfPages = PaginationUtils.getTotalPage(numTotalResults, Parameters.PAGE_SIZE);
  8. // request last page
  9. return pagedQuery(new Query(), type, numOfPages);
  10. } catch(CatalogException e) {
  11. throw new RuntimeException(e.getMessage(), e);
  12. }
  13. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. @Override
  2. public ProductPage getLastProductPage(ProductType type) {
  3. try {
  4. // query for total number of products of this type
  5. int numTotalResults = this.getNumProducts(type);
  6. // compute last page number
  7. int numOfPages = PaginationUtils.getTotalPage(numTotalResults, Parameters.PAGE_SIZE);
  8. // request last page
  9. return pagedQuery(new Query(), type, numOfPages);
  10. } catch(CatalogException e) {
  11. throw new RuntimeException(e.getMessage(), e);
  12. }
  13. }

代码示例来源:origin: apache/oodt

  1. public ProductPage getLastProductPage(ProductType type) {
  2. ProductPage lastPage = null;
  3. ProductPage firstPage = getFirstPage(type);
  4. Query query = new Query();
  5. try {
  6. lastPage = pagedQuery(query, type, firstPage.getTotalPages());
  7. } catch (CatalogException e) {
  8. LOG.log(Level.WARNING, "Exception getting last page: Message: "
  9. + e.getMessage());
  10. }
  11. return lastPage;
  12. }

相关文章