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

How to use
QueryExpression
in
org.eclipse.che.ide.api.project

Best Java code snippets using org.eclipse.che.ide.api.project.QueryExpression (Showing top 10 results out of 315)

origin: org.eclipse.che.core/che-core-ide-app

 @Override
 public QueryExpression createSearchQueryExpression(String fileMask, String contentMask) {
  QueryExpression queryExpression = new QueryExpression();
  if (!isNullOrEmpty(contentMask)) {
   queryExpression.setText(contentMask);
  }
  if (!isNullOrEmpty(fileMask)) {
   queryExpression.setName(fileMask);
  }
  if (!getLocation().isRoot()) {
   queryExpression.setPath(getLocation().toString());
  }

  return queryExpression;
 }
}
origin: org.eclipse.che.core/che-core-ide-app

Path prjPath = isNullOrEmpty(expression.getPath()) ? Path.ROOT : new Path(expression.getPath());
final String url = getBaseUrl() + SEARCH + encodePath(prjPath.addLeadingSeparator());
if (expression.getName() != null && !expression.getName().isEmpty()) {
 queryParameters.append("&name=").append(encodeQueryString(expression.getName()));
if (expression.getText() != null && !expression.getText().isEmpty()) {
 queryParameters.append("&text=").append(encodeQueryString(expression.getText()));
if (expression.getMaxItems() == 0) {
 expression.setMaxItems(
   100); // for avoiding block client by huge response until search not support pagination
queryParameters.append("&maxItems=").append(expression.getMaxItems());
if (expression.getSkipCount() != 0) {
 queryParameters.append("&skipCount=").append(expression.getSkipCount());
origin: stackoverflow.com

filter1.setConditions(ss);
QueryExpression query = new QueryExpression();
query.setEntityName("account");
query.setPageInfo(pagingInfo);
query.setColumnSet(colSet);
query.setCriteria(filter1);
origin: stackoverflow.com

 QueryExpression pagequery = new QueryExpression();
pagequery.EntityName = "account";
pagequery.Criteria.AddCondition(pagecondition);
pagequery.Orders.Add(order);
pagequery.ColumnSet.AddColumns("name", "emailaddress1");
origin: org.eclipse.che.core/che-core-ide-app

@Override
public void search(final String text) {
 final Path startPoint =
   isNullOrEmpty(view.getPathToSearch())
     ? defaultStartPoint
     : Path.valueOf(view.getPathToSearch());
 appContext
   .getWorkspaceRoot()
   .getContainer(startPoint)
   .then(
     optionalContainer -> {
      if (!optionalContainer.isPresent()) {
       view.showErrorMessage("Path '" + startPoint + "' doesn't exist");
       return;
      }
      final Container container = optionalContainer.get();
      QueryExpression queryExpression =
        container.createSearchQueryExpression(view.getFileMask(), prepareQuery(text));
      queryExpression.setMaxItems(SEARCH_RESULT_ITEMS);
      container
        .search(queryExpression)
        .then(
          result -> {
           view.close();
           findResultPresenter.handleResponse(result, queryExpression, text);
          });
     });
}
origin: stackoverflow.com

 QueryExpression query = new QueryExpression("contact");
query.ColumnSet.AddColumns("firstname", "lastname");
query.Criteria.AddFilter(filter1);
origin: org.eclipse.che.core/che-core-ide-app

protected Promise<SearchResult> search(
  final Container container, String fileMask, String contentMask) {
 QueryExpression queryExpression = new QueryExpression();
 if (!isNullOrEmpty(contentMask)) {
  queryExpression.setText(contentMask);
 }
 if (!isNullOrEmpty(fileMask)) {
  queryExpression.setName(fileMask);
 }
 if (!container.getLocation().isRoot()) {
  queryExpression.setPath(container.getLocation().toString());
 }
 return ps.search(queryExpression);
}
origin: stackoverflow.com

/// <summary>
 /// Determines if the uniqueField contains a unique value.
 /// </summary>
 /// <param name="entityName">Logical Name of the entity being checked</param>
 /// <param name="uniqueField">Field on the entity to check for uniqueness</param>
 /// <param name="recordIdField">Field on the entity that is hte Primary Key (not attribute) of the Entity - should be logical name of the entity followed by 'id' (i.e., accountid)</param>
 /// <param name="valueToCheck">Value to ensure is unique to this record</param>
 /// <param name="currentRecordId">Id (Primary Key) of the current record</param>
 /// <param name="service">An instance of IOrganizationService with Organization-wide permission to read the entity</param>
 /// <returns></returns>
 public bool isUniqueRecord(string entityName, string uniqueField, string recordIdField, string valueToCheck, Guid currentRecordId, IOrganizationService service)
 {
   var query = new QueryExpression(entityName)
   {
     ColumnSet = new ColumnSet(true)
   };
   var criteria = new FilterExpression(LogicalOperator.And);
   criteria.AddCondition(new ConditionExpression(uniqueField, ConditionOperator.Equal, valueToCheck));
   criteria.AddCondition(new ConditionExpression(recordIdField, ConditionOperator.NotEqual, currentRecordId));
   query.Criteria = criteria;
   var result = service.RetrieveMultiple(query);
   if (result.Entities.Any()) return false;
   else return true;            
 }
origin: stackoverflow.com

 function ShowImages()
{
 IMG_Logo.Visible = false;
 QueryExpression query = new QueryExpression("annotation");
 query.Criteria.AddCondition("objectid", ConditionOperator.Equal, Id);
 query.Criteria.AddCondition("mimetype", ConditionOperator.In, new string[] { "image/x-png", "image/pjpeg", "image/png", "image/jpeg" });
 query.Criteria.AddCondition("subject", ConditionOperator.NotEqual, "membershipcardthumbnail");
 query.Criteria.AddCondition("subject", ConditionOperator.NotEqual, "membershipcardimage");
 query.ColumnSet = new ColumnSet(true);
 EntityCollection AllLogoImageNotes = Common.Common.RetrieveMultiple(query);
 if (AllLogoImageNotes.Entities.Count > 0)
    {
     foreach (Entity Note in AllLogoImageNotes.Entities)
      {
      if (Note.Attributes.Contains("subject") && Note.Attributes.Contains("documentbody"))
        {
          if (Note["subject"].ToString().ToLower() == "accountlogoimage")
          {
            HttpRuntime.Cache.Remove("AccountLogoImage");
            HttpRuntime.Cache.Remove("AccountLogoImageType");
            HttpRuntime.Cache.Add("AccountLogoImage", Convert.FromBase64String(Note["documentbody"].ToString()), null, DateTime.Now.AddMinutes(5), TimeSpan.Zero, CacheItemPriority.Normal, null);
            HttpRuntime.Cache.Add("AccountLogoImageType", Note["mimetype"].ToString(), null, DateTime.Now.AddMinutes(5), TimeSpan.Zero, CacheItemPriority.Normal, null);
            IMG_Logo.ImageUrl = "AccountImageForm.aspx" + "?time=" + DateTime.Now.ToString();
            IMG_Logo.Visible = true;
            }
        }
      }
    }
 }
origin: stackoverflow.com

ConditionExpression condition = new ConditionExpression();  //to check whether an email already exist
   condition.AttributeName = "emailaddress1"; 
   condition.Operator = ConditionOperator.Equal;
   condition.Values = new string[] { "any email address"};
   FilterExpression filter = new FilterExpression();
   filter.FilterOperator = LogicalOperator.And;
   filter.Conditions = new ConditionExpression[] { condition };
   QueryExpression query = new QueryExpression();   //to specify which entity
   query.EntityName = EntityName.contact.ToString();
   query.ColumnSet = new AllColumns();
   query.Criteria = filter;    //here applying the filter
   BusinessEntityCollection app = service.RetrieveMultiple(query);
org.eclipse.che.ide.api.projectQueryExpression

Most used methods

  • <init>
  • getMaxItems
    Get maximum number of items in response.
  • getName
    Get name of file to search.
  • getPath
    Get path to start search.
  • getSkipCount
    Get amount of items to skip.
  • getText
    Get text to search.
  • setColumnSet
  • setCriteria
  • setEntityName
  • setMaxItems
    Set maximum number of items in response.
  • setName
    Set name of file to search.Supported wildcards are: * *, which matches any character sequence (inclu
  • setPageInfo
  • setName,
  • setPageInfo,
  • setPath,
  • setSkipCount,
  • setText

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Notification (javax.management)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top 17 Free Sublime Text Plugins
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