Display manual data by screen, without collecting it from the database

0

I'm in a project and I have to make a filter and show the result on the screen, the case is this:

public List<StatisticCustomObject> getPrueba(Date fDesde,Date fHasta, List<Long> transito) {
    /*TypedQuery<StatisticCustomObject> typedQuery =  getEm().
            createNamedQuery("Mensaje.findPrueba", StatisticCustomObject.class);
    typedQuery.setParameter("fDesde", fDesde);
    typedQuery.setParameter("fHasta", fHasta);
    typedQuery.setParameter("Transito", transito);
    List<StatisticCustomObject> results = typedQuery.getResultList();

    return results;*/

}

This returns the result to me on the screen in a table (for the file in xhtml that we have created), my question is how do I manually return it, with the data that I want.

Greetings.

    
asked by Manuee 03.08.2018 в 13:53
source

1 answer

0

Solved my problem, as simple as the following:

List<StatisticCustomObject> results = new ArrayList<StatisticCustomObject>();
    StatisticCustomObject obj = new StatisticCustomObject(1L, 0, 0, null, null);
    results.add(obj);

    return results;
    
answered by 03.08.2018 / 14:36
source