Java Reference
In-Depth Information
@NamedQueries({@NamedQuery(name="FindByCatalogId", query="SELECT
OBJECT(a) FROM CatalogBean AS a WHERE a.catalogId = ?1"),
@NamedQuery(name="FindByJournal", query= "SELECT OBJECT(a) FROM
CatalogBean AS a WHERE a.journal= ?1 ")
The entity class declaration and the properties declarations are specified next.
public class
CatalogBean implements {
public CatalogBean(){} public CatalogBean
String catalogId
private String catalogId;
private String journal;
private String publisher;
The id property is specified with the @Id annotation and the column is specified with
the @Column annotation. The getter/setter methods for the id property are
also specified.
@Column(name="CATALOGID", unique=true)
public String getCatalogId() {return catalogId;}
public void setCatalogId(String catalogId){this.
The getter/setter methods for the entity properties are specified next.
public String getJournal() {return journal;}
public void setJournal
String journal
public String getPublisher() {return publisher;}
Search WWH ::

Custom Search