how to take a single record from an arraylist in mongodb

Jijesh Kumar

I am working with mongodb, and i have a pojo class named "Search"

        @Document(collection = "search_details")
        public class Search {

        @Id
        private String id;
        private String searchkey;
        private ArrayList<Lead> leads;
        private String status;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public ArrayList<Lead> getLeads() {
            return leads;
        }

        public void setLeads(ArrayList<Lead> leads) {
            this.leads = leads;
        }

    }

and the Lead class looks like this...

private String id;
private String title;

public String getId() {
    return id;
}

public void setId(String id) {
    this.id = id;
}

public String getTitle() {
    return title;
}

public void setTitle(String title) {
    this.title = title;
}

i have some data in my database containing one search form with mulitiple lead forms. I have to take a single lead form form my database. Please help me for finding a better solution for this. Thank you.

Wizard

Perhaps this can help.

Query query = new Query().addCriteria(Criteria.where("searchkey").is("test").and("status").is("status").and("leads.title").is("title"));
query.fields().include("leads.$");

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类常见问题

How to download a single commit-diff from GitHub?

来自分类Dev

CloudKit - How to Save Record If Not Exists

来自分类Dev

How to deserialize a JSON file into an ArrayList with nested classes?

来自分类Dev

How to load just the last record from entity with LINQ?

来自分类Dev

Android how to savestate arraylist

来自分类Dev

jquery parse xml from single and multiple tags

来自分类Dev

How to retrieve image files from mongodb to html page

来自分类Dev

Orchard: how to persist a record without content

来自分类Dev

how to display record not found php

来自分类Dev

SQL : Create a full record from 2 tables

来自分类Dev

如何从mongodb中的arraylist中获取一条记录

来自分类Dev

how take this imageurl out using xpath

来自分类Dev

how much time will fibonacci series will take to compute?

来自分类Dev

Migration from Postgres to MongoDB

来自分类Dev

How do I copy data from each record of one table into multiple records of another table related to the first table?

来自分类Dev

How to include style, js, meta etc elements into <head> section from a single file using jQuery?

来自分类Dev

How much memory will a char in CUDA actually take?

来自分类Dev

How to fill out an ArrayList with for each loop? (Java)

来自分类Dev

How can I programmatically generate record definitions?

来自分类Dev

How to get the value from ArrayList<Object> in android

来自分类Dev

How to maintain repositories into a single repository

来自分类Dev

我如何知道ArrayList在mongoDB中是否包含特定项目?

来自分类Dev

How to get a single value from gae ndb query?

来自分类Dev

在MongoDB中保存ArrayList吗?

来自分类Dev

Select a specific staging record from sybase table

来自分类Dev

我如何知道ArrayList在mongoDB中是否包含特定项目?

来自分类Dev

从MongoDB表获取arraylist的大小

来自分类Dev

将 MongoDB 文档的 ArrayList 加载到 Java 类中

来自分类Dev

Take (value from this week) - (value from the last week) PowerPivot Dax

Related 相关文章

  1. 1

    How to download a single commit-diff from GitHub?

  2. 2

    CloudKit - How to Save Record If Not Exists

  3. 3

    How to deserialize a JSON file into an ArrayList with nested classes?

  4. 4

    How to load just the last record from entity with LINQ?

  5. 5

    Android how to savestate arraylist

  6. 6

    jquery parse xml from single and multiple tags

  7. 7

    How to retrieve image files from mongodb to html page

  8. 8

    Orchard: how to persist a record without content

  9. 9

    how to display record not found php

  10. 10

    SQL : Create a full record from 2 tables

  11. 11

    如何从mongodb中的arraylist中获取一条记录

  12. 12

    how take this imageurl out using xpath

  13. 13

    how much time will fibonacci series will take to compute?

  14. 14

    Migration from Postgres to MongoDB

  15. 15

    How do I copy data from each record of one table into multiple records of another table related to the first table?

  16. 16

    How to include style, js, meta etc elements into <head> section from a single file using jQuery?

  17. 17

    How much memory will a char in CUDA actually take?

  18. 18

    How to fill out an ArrayList with for each loop? (Java)

  19. 19

    How can I programmatically generate record definitions?

  20. 20

    How to get the value from ArrayList<Object> in android

  21. 21

    How to maintain repositories into a single repository

  22. 22

    我如何知道ArrayList在mongoDB中是否包含特定项目?

  23. 23

    How to get a single value from gae ndb query?

  24. 24

    在MongoDB中保存ArrayList吗?

  25. 25

    Select a specific staging record from sybase table

  26. 26

    我如何知道ArrayList在mongoDB中是否包含特定项目?

  27. 27

    从MongoDB表获取arraylist的大小

  28. 28

    将 MongoDB 文档的 ArrayList 加载到 Java 类中

  29. 29

    Take (value from this week) - (value from the last week) PowerPivot Dax

热门标签

归档