congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Relation.withPageSize
Code IndexAdd Tabnine to your IDE (free)

How to use
withPageSize
method
in
pl.edu.icm.yadda.service2.browse.facade.Relation

Best Java code snippets using pl.edu.icm.yadda.service2.browse.facade.Relation.withPageSize (Showing top 15 results out of 315)

origin: pl.edu.icm.yadda/bwmeta-import

.withPageSize(pageSize)
.select(Query.fields(ElementView.FIELDS_IDX_EXT_ID)
      .where(Condition.eq(ElementView.FIELD_EXTID, rootExtId))),
origin: pl.edu.icm.yadda/yaddaweb-lite-core

long t = System.currentTimeMillis();
Relation rel = browserFacade.relation(ElementView.ELEMENT_VIEW_NAME, requiredTags)
              .withPageSize(pageSize);
origin: pl.edu.icm.yadda/yadda-analysis-impl

@Override
public Map<Integer, String> getFromReferences(String sourceId) throws AnalysisException {
  try {
    Map<Integer, String> references = new HashMap<Integer, String>();
    Relation refsRelation = getRefsRelation().withPageSize(PAGE_SIZE);
    Selection selection = Query.fields(REFS_RELATION_POSITION_FIELD, REFS_RELATION_TARGET_FIELD)
                  .where(getRefsSourceCondition(sourceId));
    
    FetcherIterator fetcherIterator = new FetcherIterator(refsRelation.select(selection), PAGE_SIZE);
    while (fetcherIterator.hasNext()) {
      Serializable[] record = fetcherIterator.next();
      references.put(Integer.valueOf(record[0].toString()), record[1].toString());
    }
    return references;
  } catch (BrowseException ex) {
     throw new AnalysisException(ex);
  }
}
origin: pl.edu.icm.yadda/yadda-analysis-impl

@Override
public Map<String, Integer> getToReferences(String targetId) throws AnalysisException {
  try {
    Map<String, Integer> references = new HashMap<String, Integer>();
    Relation refsRelation = getRefsRelation().withPageSize(PAGE_SIZE);
    
    FetcherIterator fetcherIterator = new FetcherIterator(refsRelation.select(
        Query.fields(REFS_RELATION_SOURCE_FIELD, REFS_RELATION_POSITION_FIELD)
        .where(getRefsTargetCondition(targetId))), PAGE_SIZE);
    while (fetcherIterator.hasNext()) {
      Serializable[] record = fetcherIterator.next();
      references.put(record[0].toString(), Integer.valueOf(record[1].toString()));
    }
    return references;
  } catch (BrowseException ex) {
    throw new AnalysisException(ex);
  }
}
origin: pl.edu.icm.yadda/bwmeta-process

protected void notifyChildrenOfDeleted(String id,
    Set<String> parentsToInvalidate) throws YaddaException,
    BrowseException {
  Selection selection = Query.fields(ElementView.FIELD_PARENT_EXTID)
                .where(Condition.eq(ElementView.FIELD_EXTID, id));
  
  FetcherIterator fi = new FetcherIterator(
      browserFacade.relation(ElementView.ELEMENT_VIEW_NAME)
             .withPageSize(BROWSE_PAGE_SIZE)
             .select(selection), 
      BROWSE_PAGE_SIZE);
  
  while (fi.hasNext()) {
    Serializable[] row = fi.next();
    parentsToInvalidate.add(row[0].toString());
  }
  
}
origin: pl.edu.icm.yadda/yadda-analysis-impl

@Override
public Map<Integer, String> getFromReferencesAndLock(String sourceId) throws AnalysisException {
  try {
    Map<Integer, String> references = new HashMap<Integer, String>();
    Relation refsRelation = getRefsRelation().withPageSize(PAGE_SIZE);
    FetcherIterator fetcherIterator = new FetcherIterator(refsRelation.select(
        Query.fields(REFS_RELATION_POSITION_FIELD, REFS_RELATION_TARGET_FIELD)
        .where(getRefsSourceCondition(sourceId))), PAGE_SIZE);
    while (fetcherIterator.hasNext()) {
      Serializable[] record = fetcherIterator.next();
      references.put(Integer.valueOf(record[0].toString()), record[1].toString());
    }
    waitForSource(sourceId);
    return references;
  } catch (BrowseException ex) {
    throw new AnalysisException(ex);
  } catch (InterruptedException ex) {
    throw new AnalysisException(ex);
  }
}
origin: pl.edu.icm.yadda/yaddaweb-lite-core

.withPageSize(pageSize);
origin: pl.edu.icm.yadda/yadda-aas2

@Override
protected Dictionary loadDictonary() throws ServiceException {
  
  try {
    final int pageSize = 100;
    
    Relation relation = getDirectoryRelation();        
    Fetcher f = relation.withPageSize(pageSize)
              .select(Query.fields("position", "licenceId"));
    
    Dictionary dict = new Dictionary();
    
    FetcherIterator iterator = new FetcherIterator(f, pageSize);
    while (iterator.hasNext()) {
      Serializable[] row = iterator.next();
      dict.entries.put((Short)row[0], (String)row[1]);
      dict.lastEntry = (short)Math.max((Short)row[0], dict.lastEntry);
    }
                      
    return dict;
    
  } catch (BrowseException e) {
    throw new ServiceException(e);
  }
  
}
origin: pl.edu.icm.yadda/yadda-client-common

protected PagingResponse<T> processSelection(Selection sel, String relation,
    int pageSize, Object[] extraData)
    throws BrowseException, ServiceException {
  
  int ps = pageSize > 0 ? pageSize : BUFFER_PAGE_SIZE;
  
  Fetcher fetcher = browser.relation(relation, new String[] {ViewConstants.TAG_READY})
               .withPageSize(ps)
               .select(sel);
  
  List<T> li = decodeResultPage(fetcher, ps, extraData);
  Token t = new Token(fetcher.getCookie(), encodeExtraData(extraData), 0, ps);
  t.setHasNextPage(li.size() >= ps);
  PagingResponse<T> res = new PagingResponse<T>(li, t);
  return res;
}
origin: pl.edu.icm.yadda/bwmeta-process

protected Map<String, Set<ElementTreeNode>> getChildrenFromRelation(
    ElementTreeNode parent) throws BrowseException {
  Map<String, Set<ElementTreeNode>> result = new HashMap<String, Set<ElementTreeNode>>();
  Relation relation = browserFacade.relation(ElementView.ELEMENT_VIEW_NAME)
                   .withPageSize(BROWSE_PAGE_SIZE);
  Selection selection = Query.fields(ElementView.FIELD_PARENT_EXTID, ElementView.FIELD_EXTID,
                    ElementView.FIELD_LEVEL_EXTID, ElementView.FIELD_TEXT,
                    ElementView.FIELD_HIERARCHY)
                .where(Condition.eq(ElementView.FIELD_PARENT_EXTID, parent.getElementExtId()));
  
  FetcherIterator fi = new FetcherIterator(relation.select(selection), BROWSE_PAGE_SIZE);
  while (fi.hasNext()) {
    Serializable[] row = fi.next();
    String hierarchyId = (String) row[4];
    if (result.get(hierarchyId) == null) {
      result.put(hierarchyId, new HashSet<ElementTreeNode>());
    }
    ElementTreeNode child = new ElementTreeNode(row[1].toString());
    child.setParentExtId(parent.getElementExtId());
    child.setParentLevelExtId(parent.getElementLevelExtId());
    child.setParentText(parent.getElementText());
    child.setElementLevelExtId(row[2].toString());
    child.setElementText(row[3].toString());
    result.get(hierarchyId).add(child);
  }
  return result;
}
origin: pl.edu.icm.yadda/yaddaweb-lite-core

try {
  Relation rel = browserFacade.relation(ContributorView.CONTRIBUTOR_VIEW_NAME, requiredTags)
                .withPageSize(pageSize);
origin: pl.edu.icm.yadda/yaddaweb-lite-core

@Override
public Fetcher browseSubscribedItems(String libraryId,
    Map<String, String> filters) {
  try {
    Relation rel = browserFacade.relation(SubscriberView.VIEW_NAME,    requiredTags)
                  .withPageSize(1024);
    Selection query = Query.fields(SubscriberView.FIELD_TOP_ELEMENT_ID,
        SubscriberView.FIELD_TOP_ELEMENT_NAME,
        SubscriberView.FIELD_ELEMENT_ID,
        SubscriberView.FIELD_ELEMENT_NAME);
    Fetcher f = rel.select(query
        .where(Condition.eq(SubscriberView.FIELD_CONTRIBUTOR_ID,
            libraryId))
        .upBy(SubscriberView.FIELD_TOP_ELEMENT_NAME_SORTKEY)
        .upBy(SubscriberView.FIELD_TOP_ELEMENT_ID)
        .upBy(SubscriberView.FIELD_ELEMENT_NAME_SORTKEY));
    return f;
  } catch (NoSuchRelationException e) {
    log.error("Error getting subscriptions!", e);
    throw new SystemException(Modules.BROWSER,
        "Error getting subscriptions!", e);
  } catch (NoSuchFieldInRelationException e) {
    log.error("Error getting subscriptions!", e);
    throw new SystemException(Modules.BROWSER,
        "Error getting subscriptions!", e);
  }
}
origin: pl.edu.icm.yadda/yaddaweb-lite-core

String aggregation = browseScheme.getAggregation();
Relation rel = browserFacade.relation(browseScheme.getRelationName(), requiredTags)
              .withPageSize(pageSize);
origin: pl.edu.icm.yadda/yadda-analysis-impl

Relation dirtyRelation = getDirtyRelation();
Fetcher fetcher = dirtyRelation.withPageSize(PAGE_SIZE)
                .select(Query.fields(DIRTY_RELATION_SOURCE_FIELD)
                      .upBy(DIRTY_RELATION_SOURCE_FIELD));
origin: pl.edu.icm.yadda/yaddaweb-lite-core

try {
  Relation rel = browserFacade.relation(ContributorView.CONTRIBUTOR_VIEW_NAME, requiredTags)
                .withPageSize(1);
pl.edu.icm.yadda.service2.browse.facadeRelationwithPageSize

Javadoc

Sets the page size for the initial select request and returns this object.

Popular methods of Relation

  • select
    Retrieves from the relation data specified by a query.
  • getInfo
  • addOrUpdate
    Replaces data in tuples matching a condition with a new tuple, or if no atuple matches adds the data
  • aggregate
    Executes a predefined aggregation query.
  • batch
    Creates a batch descriptor for performing a set of operations in one go.
  • count
    Counts the tuples in the relation which match a condition.
  • delete
    Removes tuples matching a condition from the relation.
  • getAggregatingView
    Finds an aggregating view by a given name.
  • setAggregatingEnabled
    Suspends or resumes the usage of aggregations with incremental materialization strategy.
  • updateTags
    Updates tags of this relation.

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now