Home » Enterprise Java » Page 113

Enterprise Java

Pagination in Hibernate with query results

In this example we shall show you how to use pagination in Hibernate with query results. To use pagination in Hibernate with query results we have set the example below: Employee class is the class whose objects will be inserted to the database. In PaginationInHibernateWithQueryResults we use the Hibernate API to make the interface with the database. We create a ...

Read More »

Retrieve object by Id in Hibernate

With this example we are going to demonstrate how to retrieve an object by id in Hibernate. In short, to retrieve an object by id in Hibernate  we have set the example below: Employee class is the class whose objects will be inserted to the database. In RetrieveObjectByIdInHibernate we use the Hibernate API to make the interface with the database. ...

Read More »

Set limit in Hibernate query result

This is an example of how to set limit in Hibernate query result. In order to set limit to a query result in Hibernate we have set the example below: Employee class is the class whose objects will be inserted to the database. In SetLimitInHibernateQueryResult we use the Hibernate API to make the interface with the database. We create a new ...

Read More »

Delete persistent object with Hibernate

In this example we shall show you how to delete a persistent object with Hibernate. To delete a persistent object with Hibernate we have set the example below: Employee class is the class whose objects will be inserted to the database. In DeletePersistentObjectWithHibernate we use the Hibernate API to make the interface with the database. We create a new Configuration, ...

Read More »

Retrieve objects in Hibernate with HQL query

With this example we are going to demonstrate how to retrieve objects in Hibernate with HQL query. In short, to retrieve objects in Hibernate with HQL query  we have set the example below: Employee class is the class whose objects will be inserted to the database. In RetrieveObjectsInHibernateWithHQLQuery we use the Hibernate API to make the interface with the database. ...

Read More »

Persist object with Hibernate

This is an example of how to persist an object with Hibernate. To persist an object with Hibernate  we have set the example below: In PersistOjectWithHibernate we use the Hibernate API to make the interface with the database. We create a new Configuration, that allows the application to specify properties and mapping documents to be used when creating a SessionFactory. ...

Read More »

Create Hibernate SessionFactory example

In this example we shall show you how to create a new SessionFactory example in Hibernate. To create a new SessionFactory example in Hibernate one should perform the following steps: Create a new Configuration, that allows the application to specify properties and mapping documents to be used when creating a SessionFactory. Usually an application will create a single Configuration, build ...

Read More »

Expose EJB as a Web Service

With this example we are going to demonstrate how to expose an EJB as a web service. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services such as ...

Read More »

Reference EJB in another EJB of different applications

This is an example of how to create a reference of an EJB in another EJB of different applications. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services ...

Read More »

Reference EJB in another EJB of the same application

In this example we shall show you how to get a reference of an EJB in another EJB of the same application. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container ...

Read More »