1   package cz.muni.fi.pclis.domain;
2   
3   import cz.muni.fi.pclis.commons.domain.DomainObject;
4   
5   import javax.persistence.Entity;
6   import javax.persistence.NamedQueries;
7   import javax.persistence.NamedQuery;
8   import javax.persistence.Table;
9   
10  /**
11   * User: Ľuboš Pecho
12   * Date: 25.5.2010
13   * Time: 17:09:45
14   * To change this template use File | Settings | File Templates.
15   */
16  @Entity
17  @Table(name = "TestEntity")
18  @NamedQueries({
19          @NamedQuery(name = "getByFoo", query = "select te from TestEntity te where te.fooString = :foo"),
20          @NamedQuery(name = "getByFooInt", query = "select te from TestEntity te where te.fooInt = :fooInt")
21  })
22  public class TestEntity extends DomainObject {
23  
24      private String fooString;
25  
26      private int fooInt;
27  
28      public String getFooString() {
29          return fooString;
30      }
31  
32      public void setFooString(String fooString) {
33          this.fooString = fooString;
34      }
35  
36      public int getFooInt() {
37          return fooInt;
38      }
39  
40      public void setFooInt(int fooInt) {
41          this.fooInt = fooInt;
42      }
43  }