Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6748813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:36:43+00:00 2026-05-26T12:36:43+00:00

I have a fairly simple requirement for a query API which I need to

  • 0

I have a fairly simple requirement for a query API which I need to implement.

So, I need to query a datastructure and from the the client’s perspective, it’s like:

Select * where idValue=baseball and child.age<10 and child.city=Sydney

(and it should support any other future arguments added to the database)

Now, how can I realize this form of query in a java argument – which is clean, elegant and obvious to the user (for example use enum=idValue,age,city) etc.

My thoughts: Map<QUERY, VALUE> can work? But how do I specify age<10 or age>=20?

My client interface:

List<Child> getChildern(x);

Where x = the above mentioned select query.

References: How to Design a Good API and Why it Matters

Usecase: I have a backend database (application embedded) to which I want to provide access to for developers. My app populates the data but that data should be query-able by the api users. Now the dataabase is berkley db where I have a custom way of storing data objects.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:36:43+00:00Added an answer on May 26, 2026 at 12:36 pm

    Well, your question is just a touch too general, an actual answer would take a lot more space than would be appropriate in a SO answer. However I recommend you take a peek at Spring-Ldap’s Fileter API which more or less does what you need. It might contain more that you want to implement here, but just focus on the basic idea and go from there, because, what ever you might say about the Spring stuff, it certanly has good clean simple APIs:

    http://static.springsource.org/spring-ldap/docs/1.2.0/api/spring-ldap/org/springframework/ldap/filter/package-summary.html

    http://static.springsource.org/spring-ldap/docs/1.3.x/reference/html/basic.html#basic-filters

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly simple Linq query (simplified code): dim x = From Product
I have a fairly simple set of functionality for which I have multiple implementations,
I have a fairly simple math operation I'd like to perform on a array.
I have a fairly simple requirement -I have a table with the following (relevant)
I have fairly simple layout, like this: <div class=card> <span class=attack>1</div> <span class=defence>2</div> </div>
I have some fairly simple code using Protobuf.net, which is throwing a very odd
I have a fairly simple, though expensive, task that I need to run in
I have what seems to be a fairly simple requirement, but looking around I'm
I have a fairly simple piece of code that retrieves an object from the
I have a fairly simple class that looks like this: class Person { public:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.