You can do this in the following way.
public class
NameId implements Serializable
{
protected
String name;
protected int type;
protected String neName;
//Getters and Setters follows
}
@Entity
@Table(name = "NAME_")
@IdClass(NameId.class)
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class Name Serializable
{
@Id
protected String name;
@Id
protected int type;
protected String MOType;
@Id
protected String neName;
public Name()
{
}
//Getters and Setters follows
}