[an error occurred while processing this directive]

JPA Examples In Eclipse

                         

In the JPA Examples section we will provide you almost all the examples of JPA framework. This complete JPA tutorials will illustrate you all the features and different usages of JPA API.

We are using Eclipse IDE to develop and test the examples. Hibernate is used as JPA persistence provider framework in the examples. But you can also switch to other persistence providers such as iBatis or Toplink. At the end of the tutorial we have provided the link to download full source code the JPA Example code.

In this JPA tutorials we have provided examples of EJB QL, JPA Native Query, JPA Named query, JPA Subquery and many more. So, let's get started with JPA Examples using Eclipse IDE.

  1. JPA setFirstResult 
    In this section, you will learn how to use setFirstResult method in your jpa application. 
           
  2. JPA setMaxResults
    In this section, you will learn how to use the setMaxResults() method in your JPA application.
         
  3. JPA setParameter (Named Parameter)
    In this section, you will learn about the JPA Query API's method setParameter as a named parameter.
         
  4. JPA setParameter (Numbered Parameter)
    In the previous section we studied about the setParameter. Here, we will see setParameter to set a numbered parameter.
                    
  5. JPA getResultList
    In this section, you will see how to use the getResultList() method in your JPA application.
               
  6. JPA getSingleResult
    In this section, you will see how to use the getSingleResult() method is your JPA application.
         
  7. JPA executeUpdate
    In this section, we will learn how to use executeUpdate() method in your  JPA application.
        
  8. JPA-QL Queries
    In this section, we will use the simple JPA-QL query in our JPA application.
          
  9. JPA Native Queries
    In this section, you will know about the jpa native queries and how to use native query in your JPA application.
        
  10. JPA Named Query
    In this section, you read about the JPA Query, its types and how to integrate the JPA Named Query in your JPA application.
             
  11. JPA Named Queries
    In this section, you will read about the JPA Query, its types and how to use the JPA Named Query in your JPA application.
              
  12. JPA Named Parameter
    In this section, you will learn how to use JPA Named Parameter in your jpa application. In JPA named parameter is used where you assign names.
          
  13. JPA Positional Parameter
    In this section, you will learn about the JPA Positional Parameter and how to use in your JPA application.
                    
  14. JPA Named Parameter List
    In this section, you will learn how to develop a JPA application using JPA Named Parameter List.
          
  15. JPA Ordering
    In this section, you will learn about the JPA Ordering and how to develop JPA application using ordering.
                  
  16. JPA Grouping
    In this section, you will learn about the JPA Grouping and how to use it in your JPA application.
         
  17. JPA Sub-Queries
    In this section, you will see how to use sub-queries in your JPA application.
            
  18. JPA Aggregates
    In JPQL (Java Persistence Query Language) queries, we can select the aggregate data as well as objects. There are following types of aggregate functions:
    1. Avg()
    2. Sum()
    3. Min()

    4. Max()
    5. Count()
  19. JPQL Functions
    JPQL
    (Java Persistence Query Language) supports a predefined set of functions as follow:
    1. Concat()
    2. SubString()
    3. Trim()
    4. Lower()
    5. Upper()
    6. Lenght()   
    7. Locate()
    8. Abs()
    9. Sqrt()
    10. Mod()

Download All Application Code

                         

[an error occurred while processing this directive]