congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Relation.select
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: pl.edu.icm.yadda/yaddaweb-lite-core

f = rel.select(query.where(new ComplexClause(
    ComplexClause.Operator.OR, clausesExtId)));
f = rel.select(query);
origin: pl.edu.icm.yadda/bwmeta-import

browserFacade.relation(ElementView.ELEMENT_VIEW_NAME)
       .withPageSize(pageSize)
       .select(Query.fields(ElementView.FIELDS_IDX_EXT_ID)
             .where(Condition.eq(ElementView.FIELD_EXTID, rootExtId))),
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/yaddaweb-lite-core

contrViewFetcher = rel.select(query.where(new ComplexClause(
    ComplexClause.Operator.AND, clauses)));
contrViewFetcher = rel.select(query);
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/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

@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

f = rel.select(query.where(new ComplexClause(
    ComplexClause.Operator.AND, clauses)));
f = rel.select(query);
origin: pl.edu.icm.yadda/yadda-analysis-impl

.select(Query.fields(DIRTY_RELATION_SOURCE_FIELD)
      .upBy(DIRTY_RELATION_SOURCE_FIELD));
origin: pl.edu.icm.yadda/yaddaweb-lite-core

    ContributorView.FIELD_CONTRIBUTOR_ID);
Fetcher f = rel.select(query.where(SimpleClause.eq(ContributorView.FIELD_CONTRIBUTOR_MD5, id)));
ResultPage page = f.getPage();
pl.edu.icm.yadda.service2.browse.facadeRelationselect

Javadoc

Retrieves from the relation data specified by a query.

Popular methods of Relation

  • withPageSize
    Sets the page size for the initial select request and returns this object.
  • 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

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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