Equipment.java

package com.huaweisymantec.rmc.core.domain;

import java.util.*;


import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;


@Entity
public class Equipment {

private String esn;

private String equipmentname;

private Set<Info> info=new HashSet<Info>();


private RemoteClientPoint remoteclientpoint;

    @Id
public String getEsn() {
return esn;
}


public void setEsn(String esn) {
this.esn = esn;
}


public String getEquipmentname() {
return equipmentname;
}


public void setEquipmentname(String equipmentname) {
this.equipmentname = equipmentname;
}


@OneToMany(mappedBy="equipment",cascade={CascadeType.ALL})
public Set<Info> getInfo() {
return info;
}


public void setInfo(Set<Info> info) {
this.info = info;
}


@ManyToOne(cascade={CascadeType.ALL})
public RemoteClientPoint getRemoteclientpoint() {
return remoteclientpoint;
}


public void setRemoteclientpoint(RemoteClientPoint remoteclientpoint) {
this.remoteclientpoint = remoteclientpoint;
}





}

你可能感兴趣的:(java)