commit | author | age
|
aaf094
|
1 |
package com.redhat.training.services; |
RS |
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import javax.ejb.Stateless; |
|
6 |
import javax.persistence.EntityManager; |
|
7 |
import javax.persistence.PersistenceContext; |
|
8 |
import javax.persistence.TypedQuery; |
|
9 |
import javax.persistence.Query; |
|
10 |
|
|
11 |
import com.redhat.training.model.Person; |
|
12 |
|
|
13 |
@Stateless |
|
14 |
|
|
15 |
public class PersonService { |
|
16 |
|
|
17 |
@PersistenceContext(unitName="hello") |
|
18 |
private EntityManager entityManager; |
|
19 |
|
|
20 |
// Get all Person objects in the Database |
|
21 |
|
|
22 |
//Get persons whose name matches the name given in the query |
|
23 |
|
|
24 |
} |