In this chapter, we will cover the following recipes:
Building a
SessionFactory
Creating a generic
SessionFactory
provider classOpening a new session
Opening a stateless session
Saving an object to the database
Fetching an object from the database
Removing an object from the database
Updating an object
Creating a criteria
Restricting the results using a criteria
Pagination using a criteria
Sorting the results
Transforming a result
Using basic projection