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

  • SEARCH
  • Home
  • 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 4101628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:43:18+00:00 2026-05-20T20:43:18+00:00

In a webproject i have a complex form to build a dynamic query. When

  • 0

In a webproject i have a complex form to build a dynamic query. When i wrote this code I only had JPA 1, (no Criteria API) so i build the query String dynamicly (but still use bind parameters). This works fine so far. Now i want to save the Query (not the result) so the user can re-run the same query later.

Idealisticaly, i would just store the query string in the db. While constructing the query, i could make sure only using the IDs (not “where user = :user” but “where user.id = :userid”).

As the input to the parameters comes from the user, i like to use query parameters, to avoid ‘little bobby tables’.

Is there an easy way to do this?

  • 1 1 Answer
  • 3 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-20T20:43:19+00:00Added an answer on May 20, 2026 at 8:43 pm

    I’m not sure why this is a problem because I see no reason for you to just make a table to store the queries in.
    The tricky part must be in
    1) Getting the available parameters from somewhere. Maybe you can store that in a parameters table if needed.
    2) Deciding which parameters to set. Just find all :parameters in the query query, see if you got that parameter available and set it on the query.

    What am I missing?

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

Sidebar

Related Questions

I have a Custom Control registered in the page using this code: <%@ Register
This is for a web project so i have several classes that inherit from
I have a dynamic web project (JSP) on Eclipse that runs on a tomcat
I have webproject on Java EE 5 and Websphere 7.0 I need to create
I have a few projects in RAD 8.0, let's say DAOProject, EJBProject, WebProject, standard
I have this webprojec to which I have to add a jar from another
I have 32.6 MB Webproject with HTML, CSS, and Images. I want to check
I'm currently working on a webproject. I have to use a carousel Jquery, found
I'm planing a webproject, containing 4 websites build in MVC3. As a databaseserver I'm
Can anyone help, i have been using log4net with success i basically had a

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.