Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.ISearchField


      /* Wait for Indexer */
      waitForIndexer();

      /* All Fields */
      ISearchField field = fFactory.createSearchField(IEntity.ALL_FIELDS, fNewsEntityName);
      ISearchField stateField = fFactory.createSearchField(INews.STATE, fNewsEntityName);
      ISearchCondition stateCondition = fFactory.createSearchCondition(stateField, SearchSpecifier.IS, EnumSet.of(INews.State.NEW));

      /* Contains Any - Multi Condition (require all: false) */
      {
        ISearchCondition condition1 = fFactory.createSearchCondition(field, SearchSpecifier.CONTAINS, "johnny");
View Full Code Here


      /* Wait for Indexer */
      waitForIndexer();

      /* All Fields */
      ISearchField field = fFactory.createSearchField(IEntity.ALL_FIELDS, fNewsEntityName);
      ISearchField stateField = fFactory.createSearchField(INews.STATE, fNewsEntityName);
      ISearchCondition stateCondition = fFactory.createSearchCondition(stateField, SearchSpecifier.IS_NOT, EnumSet.of(INews.State.NEW));

      /* Contains Any - Multi Condition (require all: false) */
      {
        ISearchCondition condition1 = fFactory.createSearchCondition(field, SearchSpecifier.CONTAINS, "johnny");
View Full Code Here

    assertEquals(0, binNews.size());
  }

  private ISearch createStickySearch(boolean sticky) {
    ISearch search = fFactory.createSearch(null);
    ISearchField field = fFactory.createSearchField(INews.IS_FLAGGED, INews.class.getName());

    ISearchCondition condition = fFactory.createSearchCondition(field, SearchSpecifier.IS, sticky);
    search.addSearchCondition(condition);

    return search;
View Full Code Here

    return search;
  }

  private ISearch createScopeSearch(IFolderChild scope) {
    ISearch search = fFactory.createSearch(null);
    ISearchField field = fFactory.createSearchField(INews.LOCATION, INews.class.getName());

    ISearchCondition condition = fFactory.createSearchCondition(field, SearchSpecifier.SCOPE, ModelUtils.toPrimitive(Arrays.asList(new IFolderChild[] { scope })));
    search.addSearchCondition(condition);

    return search;
View Full Code Here

    return search;
  }

  private ISearch createTitleSearch(String title) {
    ISearch search = fFactory.createSearch(null);
    ISearchField field = fFactory.createSearchField(INews.TITLE, INews.class.getName());

    ISearchCondition condition = fFactory.createSearchCondition(field, SearchSpecifier.IS, title);
    search.addSearchCondition(condition);

    return search;
View Full Code Here

    return search;
  }

  private ISearch createDescriptionSearch(String description) {
    ISearch search = fFactory.createSearch(null);
    ISearchField field = fFactory.createSearchField(INews.DESCRIPTION, INews.class.getName());

    ISearchCondition condition = fFactory.createSearchCondition(field, SearchSpecifier.CONTAINS, description);
    search.addSearchCondition(condition);

    return search;
View Full Code Here

    private List<ISearchCondition> getDefaultConditions() {
      List<ISearchCondition> conditions = new ArrayList<ISearchCondition>(1);
      IModelFactory factory = Owl.getModelFactory();

      ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
      ISearchCondition condition = factory.createSearchCondition(field, SearchSpecifier.CONTAINS, ""); //$NON-NLS-1$

      conditions.add(condition);

      return conditions;
View Full Code Here

  }

  private ISearchCondition getDefaultCondition() {
    IModelFactory factory = Owl.getModelFactory();

    ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
    ISearchCondition condition = factory.createSearchCondition(field, SearchSpecifier.CONTAINS, "");

    return condition;
  }
View Full Code Here

    });
  }

  private ISearchCondition createCondition(ISearchCondition current) {
    IModelFactory factory = Owl.getModelFactory();
    ISearchField field = factory.createSearchField(current.getField().getId(), current.getField().getEntityName());
    return factory.createSearchCondition(field, current.getSpecifier(), "");
  }
View Full Code Here

  private List<ISearchCondition> getDefaultConditions() {
    List<ISearchCondition> conditions = new ArrayList<ISearchCondition>(1);
    IModelFactory factory = Owl.getModelFactory();

    ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
    ISearchCondition condition = factory.createSearchCondition(field, SearchSpecifier.CONTAINS, "");
    conditions.add(condition);

    return conditions;
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.ISearchField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.