Class XRay
- java.lang.Object
-
- ejava.examples.orm.core.annotated.XRay
-
@Entity public class XRay extends Object
This class provides an example of embedding another object within a containing object being mapped to the database. In this case, XRay is assigned a primary key and mapped to the database. It has two local properties, but maker name, address, and phone are part of a Manufacturer class. This works much like the @EmbeddedId case, except the embedded class is just used for normal properties and not primary key values.
-
-
Field Summary
Fields Modifier and Type Field Description private long
id
private Manufacturer
maker
private String
model
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getId()
Manufacturer
getMaker()
String
getModel()
void
setMaker(Manufacturer maker)
void
setModel(String model)
String
toString()
-
-
-
Field Detail
-
id
private long id
-
maker
private Manufacturer maker
-
model
private String model
-
-
Method Detail
-
getId
public long getId()
-
getModel
public String getModel()
-
setModel
public void setModel(String model)
-
getMaker
public Manufacturer getMaker()
-
setMaker
public void setMaker(Manufacturer maker)
-
-