1
//$Id: Alarm.java 15074 2008-08-14 17:38:00Z epbernard $
2
package org.hibernate.test.annotations.inheritance.joined;
4
import javax.persistence.DiscriminatorValue;
5
import javax.persistence.Entity;
6
import javax.persistence.JoinColumn;
7
import javax.persistence.JoinColumns;
8
import javax.persistence.OneToOne;
11
@DiscriminatorValue("AlarmT")
12
public class Alarm extends EventInformation {
14
protected EventInformation eventInfo;
17
@JoinColumns({@JoinColumn(name = "EVENTINFO_NOTIFICATIONID",
18
referencedColumnName = "NOTIFICATIONID")})
19
public EventInformation getEventInfo() {
23
public void setEventInfo(EventInformation value) {
24
this.eventInfo = value;
29
public String toString() {
30
StringBuilder sb = new StringBuilder();
31
String eventId = ( getEventInfo() != null ?
32
getEventInfo().getNotificationId() : null );
34
"AlarmT: id = " + getNotificationId() + "\t" +
35
"has event id = " + eventId