0

a beginners question: Is there any support from Rapidclipse regarding automatic lazy loading from self created JPA queries e.g. for lazy loading scrolled tables ?

There is the 'AutoQuery' feature. But that does only apply to 'DAO().findall()', not for self build JPA queries, correct ?

Do I have to implement this lazy loading then for each of my JPA queries ?

Any hint is appreciated or even better a link to some example.

Thanks Gerry

user1226230
  • 381
  • 1
  • 3
  • 11
  • I did manage to write my own Query in DAO created by Rapidclipse Wizard. The only thing I have to make sure that if anyone/me imports that table again they have to copy that Query/Method and back it up and once imported put it back – Prashant Kumar May 15 '21 at 14:33
  • Is there any specific reason you are not using the in-built feature of Rapidclipse? As far as I can remember I use "DAO().findall()" and it is working. Can you please explain what are you trying to do? – Prashant Kumar May 15 '21 at 14:34
  • Hi Prashant, thanks for taking care. I must load a DB result set data in a chunked manner with my own query as the DB query result is very large. Then I load the chunked data into the VAADIN table while scrolling in that table. I expect Rapidclipse to generate an SQL select statement like 'select * from myTable limit=10 offset=123' ... – user1226230 May 16 '21 at 09:30
  • ... Rapiclipse generates such SQL statements with HIBERNHATE just fine for dao.find() or dao.findAll() as they are obviously built-in. But not for my own JPA Queries: "select from myTable where mySelect = MyEntity.MyAttribute=someValue# Question now is, do I have to take care on my own for such lazy loading or does Rapidclipse has some assistance for that. Thx Gerry – user1226230 May 16 '21 at 09:30
  • Rapidclipse provides you JPA-SQL query tab where you can type the queries you want and the methods will be generated automatically. The options are vary depending on which Version of Rapidclipse you are using. - Rapidclipse 4: Rapidclipse 4 Documentation: https://rapidclipse.atlassian.net/wiki/spaces/DOCEN/pages/50757883/JPA-SQL - Rapidclipse X: When you will open DAO file in DAO Editor and click on JPA-SQL tab you can type your queries there. - Rapidclipse 10.4: You have to open .jpasql file in JPASQL Editor and Type the queries. – Prashant Kumar May 16 '21 at 22:09
  • In all these above states, when saving the file your custom method will be generated in your DAO. I am hoping this is what you are looking for. You can write any queries. The options are changing in diff. versions because Rapidclipse's Developers trying to optimize the IDE – Prashant Kumar May 16 '21 at 22:11

0 Answers0