Codota Logo
FieldEnd
Code IndexAdd Codota to your IDE (free)

How to use
FieldEnd
in
org.mongodb.morphia.query

Best Java code snippets using org.mongodb.morphia.query.FieldEnd (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: ltsopensource/light-task-scheduler

@Override
public JobPo getJob(String taskTrackerNodeGroup, String taskId) {
  Query<JobPo> query = template.createQuery(JobPo.class);
  query.field("taskId").equal(taskId).
      field("taskTrackerNodeGroup").equal(taskTrackerNodeGroup);
  return query.get();
}
origin: getheimdall/heimdall

query.field(filtersDTO.getName()).equal(value1);
break;
query.field(filtersDTO.getName()).notEqual(value1);
break;
query.field(filtersDTO.getName()).containsIgnoreCase(value1.toString());
break;
query.field(filtersDTO.getName()).greaterThanOrEq(value1);
query.field(filtersDTO.getName()).lessThanOrEq(value2);
break;
query.field(filtersDTO.getName()).lessThan(value1);
break;
query.field(filtersDTO.getName()).lessThanOrEq(value1);
break;
query.field(filtersDTO.getName()).greaterThan(value1);
break;
query.field(filtersDTO.getName()).greaterThanOrEq(value1);
break;
query.field(filtersDTO.getName()).exists();
break;
query.field(filtersDTO.getName()).doesNotExist();
origin: groupon/DotCi

public <T extends DbBackedBuild> Iterable<T> getCurrentUserBuildsGreaterThan(final DbBackedProject project, final int number) {
  final List<DbBackedBuild> builds = getQuery(project)
    .order("-number")
    .field("pusher").equal(Jenkins.getAuthentication().getName())
    .field("number").greaterThan(number)
    .asList();
  for (final DbBackedBuild build : builds) {
    associateProject(project, build);
  }
  return (Iterable<T>) builds;
}
origin: groupon/DotCi

public DynamicSubProject getChild(final IdentifableItemGroup<DynamicSubProject> parent, final String name) {
  final DynamicSubProject subProject = getDatastore().createQuery(DynamicSubProject.class).
    disableValidation().
    field("name").equal(name).
    field("parentId").exists().
    field("parentId").equal(parent.getId()).
    get();
  if (subProject != null) {
    try {
      subProject.onLoad(parent, name);
    } catch (final IOException e) {
      throw new RuntimeException(e);
    }
  }
  return subProject;
}
origin: groupon/DotCi

public DbBackedBuild getPreviousFinishedBuildOfSameBranch(final DbBackedBuild build, final String branch) {
  final DbBackedProject project = (DbBackedProject) build.getProject();
  final Query<DbBackedBuild> query = getQuery(project);
  if (branch != null) filterExpression(branch, query);
  final DbBackedBuild previousBuild = query.
    limit(1).
    order("-number").
    field("state").equal("COMPLETED").field("number").lessThan(build.getNumber()).
    get();
  associateProject(project, previousBuild);
  return previousBuild;
}
origin: getheimdall/heimdall

switch(date) {
  case TODAY: {
    query.field(insertedOnDate).containsIgnoreCase(LocalDate.now().format(DateTimeFormatter.ISO_DATE));
    query.field(insertedOnDate).containsIgnoreCase(LocalDate.now().minusDays(1).format(DateTimeFormatter.ISO_DATE));
    query.field(insertedOnDate).greaterThanOrEq(week.get("first").format(DateTimeFormatter.ISO_DATE));
    query.field(insertedOnDate).lessThanOrEq(week.get("last").format(DateTimeFormatter.ISO_DATE));
    break;
    query.field(insertedOnDate).greaterThanOrEq(week.get("first").format(DateTimeFormatter.ISO_DATE));
    query.field(insertedOnDate).lessThanOrEq(week.get("last").format(DateTimeFormatter.ISO_DATE));
    break;
    query.field(insertedOnDate).containsIgnoreCase(CalendarUtils.yearAndMonth(LocalDate.now()));
    break;
    query.field(insertedOnDate).containsIgnoreCase(CalendarUtils.yearAndMonth(LocalDate.now().minusMonths(1)));
    break;
origin: BlackLabs/play-morphia

@Override
public Long count(List<String> searchFields, String keywords,
         String where) {
  Query<?> q = ds().createQuery(clazz);
  if (keywords != null && !keywords.equals("")) {
    List<Criteria> cl = new ArrayList<Criteria>();
    String[] sa = keywords.split("[\\W]+");
    for (String f : fillSearchFieldsIfEmpty_(searchFields)) {
      for (String s : sa) {
        cl.add(q.criteria(f).containsIgnoreCase(keywords));
      }
    }
    q.or(cl.toArray(new Criteria[]{}));
  }
  processWhere(q, where);
  return q.countAll();
}
origin: NationalSecurityAgency/lemongrenade

/**
 * finds job by date ranges
 * @param createdBefore   date  - "Includes the day listed", example: "2016-08-08T18:04:23.514Z"
 * @param createdAfter    date  - "Includes the day listed", example: "2016-08-08T18:04:23.514Z"
 * @return List of LGJob items found
 */
public List<LGJob> getAllByDateRange(Date createdBefore, Date createdAfter) {
  Query<LGJob> query;
  if ((createdBefore != null)  && (createdAfter == null) ) {
    query = getDatastore().createQuery(LGJob.class)
      .field("createDate").lessThanOrEq(createdBefore);
  } else if ((createdBefore == null)  && (createdAfter != null)) {
      query = getDatastore().createQuery(LGJob.class)
          .field("createDate").greaterThanOrEq(createdAfter);
    } else {
    query = getDatastore().createQuery(LGJob.class)
        .filter("createDate <=", createdBefore)
        .filter("createDate >=", createdAfter);
  }
  return query.asList();
}
origin: groupon/DotCi

  public <B extends DbBackedBuild<P, B>, P extends DbBackedProject<P, B>> B getNextBuild(final DbBackedProject<P, B> project, final int number) {
    final DbBackedBuild build = getQuery(project).
      field("number").greaterThan(number).order("number").
      get();
    if (build != null) {
      associateProject(project, build);
    }
    return (B) build;
  }
}
origin: groupon/DotCi

public <T extends DbBackedBuild> Iterable<T> getBuildGreaterThan(final DbBackedProject project, final int number, final String branch) {
  Query<DbBackedBuild> query = getQuery(project).order("number")
    .field("number").greaterThan(number)
    .order("-number");
  if (branch != null) {
    query = query.field("actions.causes.branch.branch").equal(branch);
  }
  final List<DbBackedBuild> builds = query.asList();
  for (final DbBackedBuild build : builds) {
    associateProject(project, build);
  }
  return (Iterable<T>) query.asList();
}
origin: groupon/DotCi

public Iterable<DynamicSubProject> getChildren(final DynamicProject parent) {
  final List<DynamicSubProject> children = getDatastore().createQuery(DynamicSubProject.class).
    disableValidation().
    field("parentId").exists().
    field("parentId").equal(parent.getId()).
    asList();
  for (final DynamicSubProject subProject : children) {
    try {
      subProject.onLoad(parent, subProject.getName());
    } catch (final IOException e) {
      throw new RuntimeException(e);
    }
  }
  return children;
}
origin: BlackLabs/play-morphia

@Override
public List<play.db.Model> fetch(int offset, int size, String orderBy,
                 String order, List<String> searchFields, String keywords,
                 String where) {
  if (orderBy == null)
    orderBy = keyName();
  if ("DESC".equalsIgnoreCase(order))
    orderBy = null == orderBy ? null : "-" + orderBy;
  Query<? extends Model> q = ds().createQuery(clazz).offset(offset)
      .limit(size);
  if (null != orderBy)
    q = q.order(orderBy);
  if (keywords != null && !keywords.equals("")) {
    List<Criteria> cl = new ArrayList<Criteria>();
    String[] sa = keywords.split("[\\W]+");
    for (String f : fillSearchFieldsIfEmpty_(searchFields)) {
      List<Criteria> cl0 = new ArrayList<Criteria>();
      for (String s : sa) {
        cl0.add(q.criteria(f).containsIgnoreCase(s));
      }
      cl.add(q.and(cl0.toArray(new Criteria[]{})));
    }
    q.or(cl.toArray(new Criteria[]{}));
  }
  processWhere(q, where);
  List<play.db.Model> l = new ArrayList<play.db.Model>();
  l.addAll(q.asList());
  return l;
}
origin: ltsopensource/light-task-scheduler

@Override
public void removeNodeGroup(NodeType nodeType, String name) {
  Query<NodeGroupPo> query = template.createQuery(NodeGroupPo.class);
  query.field("nodeType").equal(nodeType).field("name").equal(name);
  template.delete(query);
}
origin: RentTheRunway/alchemy

  query.criteria("name").containsIgnoreCase(filter.getFilter()),
  query.criteria("description").containsIgnoreCase(filter.getFilter())
);
origin: ltsopensource/light-task-scheduler

@Override
public void removeNodeGroup(NodeType nodeType, String name) {
  Query<NodeGroupPo> query = template.createQuery(NodeGroupPo.class);
  query.field("nodeType").equal(nodeType).field("name").equal(name);
  template.delete(query);
}
origin: ltsopensource/light-task-scheduler

private Query<JobPo> addCondition(Query<JobPo> query, String field, Object o) {
  if (!checkCondition(o)) {
    return query;
  }
  query.field(field).equal(o);
  return query;
}
origin: ltsopensource/light-task-scheduler

@Override
public JobPo getJob(String taskTrackerNodeGroup, String taskId) {
  Query<JobPo> query = template.createQuery(JobPo.class);
  query.field("taskId").equal(taskId).
      field("taskTrackerNodeGroup").equal(taskTrackerNodeGroup);
  return query.get();
}
origin: ltsopensource/light-task-scheduler

@Override
public JobPo getJob(String taskTrackerNodeGroup, String taskId) {
  Query<JobPo> query = template.createQuery(JobPo.class);
  query.field("taskId").equal(taskId).
      field("taskTrackerNodeGroup").equal(taskTrackerNodeGroup);
  return query.get();
}
origin: ltsopensource/light-task-scheduler

@Override
public JobPo getJob(String taskTrackerNodeGroup, String taskId) {
  Query<JobPo> query = template.createQuery(JobPo.class);
  query.field("taskId").equal(taskId).
      field("taskTrackerNodeGroup").equal(taskTrackerNodeGroup);
  return query.get();
}
origin: ltsopensource/light-task-scheduler

private Query<JobPo> addCondition(Query<JobPo> query, String field, Object o) {
  if (!checkCondition(o)) {
    return query;
  }
  query.field(field).equal(o);
  return query;
}
org.mongodb.morphia.queryFieldEnd

Javadoc

Represents a document field in a query and presents the operations available to querying against that field.

Most used methods

  • equal
    Checks that a field equals a value
  • containsIgnoreCase
    Checks if a field contains a value ignoring the case of the values
  • exists
    Checks that a field exists in a document
  • greaterThan
    Checks that a field is greater than the value given
  • greaterThanOrEq
    Checks that a field is greater than or equal to the value given
  • in
    Synonym for #hasAnyOf(Iterable)
  • lessThan
    Checks that a field is less than the value given
  • lessThanOrEq
    Checks that a field is less than or equal to the value given
  • notEqual
    Checks that a field doesn't equal a value
  • doesNotExist
    Checks that a field does not exist in a document
  • hasAnyOf
    Checks that a field has any of the values listed.
  • startsWith
    Checks that a field starts with a value
  • hasAnyOf,
  • startsWith

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • requestLocationUpdates (LocationManager)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now