Wednesday, 8 April 2009

[Hibernate] native SQL example

@SuppressWarnings("unchecked")
@Transactional
public void getTest(IUiListCfg uiListCfg) throws ReportException {

try {
String sSql = "select sGroupId, sGroupName from tRmCo_Group";
SQLQuery query = this.sessionFactory.getCurrentSession().createSQLQuery(sSql).addScalar("sGroupId", Hibernate.STRING).addScalar("sGroupName", Hibernate.STRING);

List list = query.list();
for( Object[] objArr : list){
for( Object obj : objArr){

System.out.println(obj );
}
}
System.out.println("============"+list.size());

} catch (Exception e) {
e.printStackTrace();
}
}

24 comments:

Anonymous said...

Thank you Thank you Thank you, you saved my a**

Anonymous said...

Thanks in favor of sharing such a good thinking, post
is nice, thats why i have read it entirely
Also see my website > Marine store specialist

Anonymous said...

Somebody essentially help to make severely posts I might state.
This is the very first time I frequented your website page and thus far?
I amazed with the research you made to make this particular put up incredible.
Great process!
My web blog - click the up coming article

Anonymous said...

Why people still make use of to read news papers when in this technological globe all
is presented on net?
Also visit my webpage - click through the following page

Anonymous said...

Tremendous issues here. I am very glad to see your post.
Thank you so much and I am looking ahead to contact you.
Will you please drop me a mail?
My website : Ecommerce investments

Anonymous said...

It is perfect time to make a few plans for
the future and it's time to be happy. I have learn this put up and if I may I want to counsel you some attention-grabbing issues or suggestions. Maybe you could write subsequent articles regarding this article. I want to read even more things about it!
My web page: neucopia compensation plan

Anonymous said...

I needed to thank you for this wonderful read!! I certainly loved every bit of it.
I have got you book-marked to look at new things you post…
My weblog ... web hosting delhi

Anonymous said...

Attractive component of content. I simply stumbled upon your web site
and in accession capital to claim that I get in fact enjoyed account your blog posts.

Any way I will be subscribing on your feeds and even
I achievement you get entry to consistently quickly.
My webpage :: escort london

Anonymous said...

Great article, totally what I needed.

my web site Shabby Chic Moebel Karlsruhe
my webpage: Shabby Chic Moebel Karlsruhe,Vintage Moebel Karlsruhe,Villa Schoensinn Karlsruhe

Anonymous said...

Hey I know this is off topic but I was wondering if you knew of any widgets I
could add to my blog that automatically tweet my newest twitter updates.
I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

Also visit my web page; walking calorie calculator
my website :: activity calorie calculator

Anonymous said...

Asking questions are truly good thing if you are not understanding something
entirely, except this paragraph gives good understanding yet.


Feel free to visit my webpage - careers

Anonymous said...

Good way of explaining, and nice paragraph to obtain data about
my presentation subject, which i am going to convey in school.


My blog Power Complaints
My site > Summitt Energy Complaints

Anonymous said...

Did you know that Phen375 provides so much more than your common dietary tablet.
You need to come up with a diet plan that can keep you eating the proper volume of calories each day.
Phen375 (or Phentermine375) is a synthetic fat burner and urge for food suppressant.


my webpage: diet pills

Anonymous said...

I go to see daily some blogs and information sites to read articles or
reviews, except this blog presents feature based articles.


Also visit my homepage; Interracial Hidden Cam Office Sex

Anonymous said...

I haѵe been exρlοring fοr a little bіt for any
high-quality articles oг blοg ρosts in
thiѕ ѕοгt of house . Еxploring in Yahoo Ι finally stumblеd
upоn this ωebsitе. Reading this info So i'm happy to exhibit that I have an incredibly just right uncanny feeling I found out just what I needed. I such a lot without a doubt will make certain to don?t overlook this site and provides it a glance regularly.

Here is my web blog :: diamondlinks review

Anonymous said...

You have made some decent points there. I checked on the net to
learn more about the issue and found most individuals will go along with your
views on this website.

Check out my web page :: Http://Www.Xxxmoviegalls.Com/

Anonymous said...

Excellent weblog here! Also your web site lots up very fast!
What host are you the use of? Can I get your affiliate hyperlink to your host?
I desire my web site loaded up as quickly as yours lol

my website; sexy girls videos

Anonymous said...

Do you have a spam issue on this website; I also am a blogger, and I was curious
about your situation; we have developed some nice practices and
we are looking to swap strategies with other folks,
be sure to shoot me an e-mail if interested.

Look at my webpage ... www.sex-xxx-erotica.com

Anonymous said...

hey there and thank you for your info – I've certainly picked up anything new from right here. I did however expertise several technical issues using this web site, as I experienced to reload the website a lot of times previous to I could get it to load properly. I had been wondering if your web host is OK? Not that I'm complaining, but sluggish
loading instances times will often affect your placement in google and could damage your high-quality score if ads and marketing with Adwords.
Anyway I am adding this RSS to my e-mail and
could look out for a lot more of your respective fascinating
content. Make sure you update this again soon.

My website :: sex video voyeur

Anonymous said...

I was suggested this blog through my cousin. I am no longer
sure whether this publish is written through him as nobody else realize
such specific about my difficulty. You are amazing! Thank you!



Also visit my blog post ... top eleven football manager hack

Anonymous said...

Thanks for sharing your info. I truly appreciate your efforts
and I will be waiting for your next write ups thank you once again.

Here is my weblog: Perez hilton Weight loss

Anonymous said...

Hey would you mind sharing which blog platform
you're working with? I'm planning to start my own blog in the near future but
I'm having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different then most
blogs and I'm looking for something completely unique.
P.S My apologies for getting off-topic but I had to ask!


Here is my webpage: affiliate.realpassiveprofits.com - ,

Anonymous said...

Very good post! We will be linking to this great post on our site.

Keep up the great writing.

Feel free to visit my web site :: personal injury attorney denver co - Www.Lexpert.ca,

Anonymous said...

Currently, Beijing's population has surged close to or
even nike free run 3 womensexceed the load limit
environmental resources.




In this regard, the Beijing Municipal nike free run 3 womens pinkCommittee
of Peasants and Workers Democratic proposals, Beijing should be strictly
nike free shoeslimited in violation of the national family planning
policy to bounce back with the children of migrant workers nike run free 5.0living in Beijing to work and school.




Personnel should not handle this kind of residence permit or temporary residence permit, does not allow its
long-term rent in Beijing.



Have a look at my homepage ... cheap nike free shoes