Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Hibernate Criteria Query Example

The Criteria interface allows to create and execute object-oriented queries.

Tutorial Details:

It is powerful alternative to the HQL but has own limitations. Criteria Query is used mostly in case of multi criteria search screens, where HQL is not very effective.

The interface org.hibernate.Criteria is used to create the criterion for the search. The org.hibernate.Criteria interface represents a query against a persistent class. The Session is a factory for Criteria instances. Here is a simple example of Hibernate Criterial Query:


 

Rate Tutorial:
http://www.roseindia.net/hibernate/criteriaqueyexample.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Hibernate Criteria Query Example

View Tutorial:
Hibernate Criteria Query Example

Related Tutorials:

Jini: New technology for a networked world - JavaWorld June 1999
Jini: New technology for a networked world - JavaWorld June 1999
 
Locate services with the Jini lookup service
Locate services with the Jini lookup service
 
The Gnutella file-sharing network and Java - JavaWorld October 2000
The Gnutella file-sharing network and Java - JavaWorld October 2000
 
Optimize a query on a Map - JavaWorld November 2000
Optimize a query on a Map - JavaWorld November 2000
 
Comparison between the two major JDO architectures
Comparison between the two major JDO architectures
 
Object-relation mapping without the container
If you follow the latest developer buzz then you\\\\\'ve likely heard of IOC (Inversion of Control) containers and AOP (aspect-oriented programming).
 
Capture the benefits of asynchronous logging
Capture the benefits of asynchronous logging Develop an asynchronous log service using JMS and Hibernate This article will help you develop a simple log service. The service creates some log messages, sends them across the network to a JMS provider,
 
Simple classes for JDBC
Simple classes for JDBC
 
Working with Hibernate in Eclipse
Working with Hibernate in Eclipse Eclipse is a great example of the power of an open, extensible environment in which people all around the world can contribute.
 
Put JSF to work
Build a real-world Web application with JavaServer Faces, the Spring Framework, and Hibernate Summary Building a real-world Web application using JavaServer Faces is not a trivial task. This article shows you how to integrate JSF, the Spring Framewor
 
An example of public use
ashkelon lite "ashkelon lite" provides all the benefits of the ashkelon product without any of the hassle and overhead. It's ashkelon in a war file. There's no need to setup a database, no need to configure _anything_, not even to populate a repository
 
JavaMatch
What is JavaMatch? JavaMatch is an engine that can search inside a runtime Java data structures, and look for objects that best match the criteria that you specify. JavaMatch is a generic match engine, not targeted at a specific domain. It can be applied
 
XML Messaging Using JBoss
It\'s common practice to share data using FTP, but an increasingly popular alternative is to use a messaging service. As always, each approach has its own pros and cons, depending on the nature of "what to share," how easy it is to implement the technolog
 
Gain SQL SELECT functionality in Java
Gain SQL SELECT functionality in Java Summary In "Filter Collections," David Rappoport described a simple way to filter collections of objects. In this article, he expands on this idea and shows you how to treat an array or a collection of objects the s
 
SOFIA 2.3 released with Hibernate and Dynamic HTML components
SOFIA 2.3 released with Hibernate and Dynamic HTML components
 
Simple Object Persistence with the db4o Object Database
Simple Object Persistence with the db4o Object Database. db4o has been chosen for applications in embedded systems in which zero administration, reliability, and low footprint are critical features. In Germany, BMW Car IT, for example, uses it in an embed
 
Hibernate simplifies inheritance mapping.
Learn three easy-to-implement strategies to map class hierarchies. Hibernate is an object-relational mapping and persistence framework that provides a lot of advanced features, ranging from introspection to polymorphism and inheritance mapping.
 
Adding search to your applications
The Lucene search engine is an open source, Jakarta project used to build and search indexes. Lucene can index any text-based information you like and then find it later based on various search criteria.
 
What is Persistence Framework?
What is Persistence Framework? What is Persistence Framework? A persistence framework moves the program data in its most natural form (in memory objects) to and from a permanent data store the database. The persistence framework manages the
 
Adding slash "\" character before quote "'" in a query
Adding slash "\" character before quote "'" in a query Adding slash " \ " character before quote " ' " in a query During the inserting the records in the database if user enters the phrases like "What ' s your name?", database gives the error due
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.