• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

PdqDaoSupport Examples on querying the data

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Team,

Good Morning,

I'm new to Spring PdqDaoSupport API(org.springmodules.purequery.support.PdqDaoSupport) and I'm trying to look for the syntax to execute the below query.How to pass values dynamically need some help on retrieving the data from the tables.Does the TABLE to POJO mapping happens internally ? Spring will take care of that and Please suggest me some tutorials or links which contains some examples.
I tried searching online but i'm not able to find any thing with PdqDaoSupport. Probably I'm not sure whether i'm searching in the right way or not.Thanks a lot...


import org.springmodules.purequery.support.PdqDaoSupport;

public class AccountDao extends PdqDaoSupport {

/*
* Developer will write code here
*/

public Account[] getAccounts() {
String sql = "SELECT * FROM ACCOUNT where ACCOUNTCREATIONDT < ?";
return (Account[]) getPdqTemplate().queryArray(sql,
Account.class);
}

// Other methods goes here

}

Regards,
Venkat-
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic