topclass:
Code:
@Indexed
@Entity
public abstract class topclass implements Serializable {
@DocumentId
private Integer id = null;
@IndexedEmbedded
private A someA = null;
@IndexEmbedded
private B someB = null;
....
@IndexedEmbedded
private Set<C> notizen = new HashSet<C>();
...
interface C:
Code:
@Entity
public interface C {
@DocumentId
public Integer getId();
@Field
public String getText();
...
class implementing C:
Code:
@Indexed
@Entity
public abstract class someOtherClass implements C, Serializable {
private static final long serialVersionUID = 1L;
@DocumentId
private Integer id = null;
@Field(index=Index.UN_TOKENIZED, store=Store.YES)
private String text = null;
...
class extending someOtherClass:
Code:
@Entity
public class someFinalClass extends someOtherClass {
private static final long serialVersionUID = 1L;
@IndexedEmbedded
private someAttrib sab = null;
...