JPAContainer<X.class UNION Y.class> containerBoth

The title seems confused lol…

I’d just like to show in my array the elements from X.class UNION elements from Y.class
(on those column names : Who,What,Where)

here is my ‘abstract’ class that I will extend on my child classes:

@DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING)
public class Historique implements Serializable{
    private static final long serialVersionUID = 1L;

    @GeneratedValue(strategy = GenerationType.AUTO)
    protected Long id;

    @Size(max = 100)
    protected String Who;

    @Size(max = 500)
    protected String What;

    protected Date When;


public class HistoriqueX extends Historique {

    private static final long serialVersionUID = 1L;
    private X x;

    public X getX() {
        return x;

    public void setX(X x) {
        this.x = x;

So at the moment i’m able to show my data from X in a table :

JPAContainer<HistoriqueDemandeAval> containerHisto = JPAContainerFactory.makeJndi(HistoriqueDemandeAval.class);
        containerHisto.addContainerFilter(new Compare.Equal("", sejourId));
        Table tableHisto = new Table("Historique", containerHisto);
        tableHisto.setVisibleColumns(new Object{"when", "what", "who"});
        tableHisto.setColumnHeaders(new String{"Date", "Action", "Author"});

But my absolute goal is to make a UNION of those same elements (who,what,who) with the HistoriqueY.class (which is comparable to my HistoriqueX.class)