Created
November 12, 2016 13:15
-
-
Save tassioauad/f82fb2bef33510d7cef8ac9483e92ac3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SalesAccountingModel { | |
private EntityManager entityManager; | |
public SalesAccountingModel(EntityManager entityManager) { | |
this.entityManager = entityManager; | |
} | |
public List listAll(Date initialDate, Date finalDate) { | |
StoredProcedureQuery storedProcedureQuery = entityManager.createStoredProcedureQuery("SALES_ACCOUNTING", SalesAccounting.class) | |
.registerStoredProcedureParameter("INITIALDATE", Date.class, ParameterMode.IN) | |
.registerStoredProcedureParameter("FINALDATE", Date.class, ParameterMode.IN); | |
return (List) storedProcedureQuery.setParameter("INITIALDATE", dataInicio).setParameter("FINALDATE", dataFim).getResultList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment