Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Transactional(readOnly = true, rollbackFor = Exception.class)
- public List<Ticket> getTicketBySS(String sSessionId_p,
- String sTicketStatus_p) throws RossRepositoryException, RossServiceException {
- try{
- // applying filter to TicketStatusDmn ID
- List<JoinTable> joinTables = new ArrayList<ExampleJoinTable.JoinTable>();
- List<Object> equalStatus = new ArrayList<Object>();
- equalStatus.add(new Equal("id", Integer.parseInt(sTicketStatus_p)));
- joinTables.add(new JoinTable("ticketStatusDmn", equalStatus));
- // applying filter to Session ID
- List<Object> equalSession = new ArrayList<Object>();
- equalStatus.add(new Equal("id", Integer.parseInt(sTicketStatus_p)));
- joinTables.add(new JoinTable("sessions", equalSession));
- ExampleJoinTable example = new ExampleJoinTable(joinTables);
- List<Ticket> result = ticketDAO.findByExample(new Ticket(), example);
- return result;
- }
- catch (RossRepositoryException e) {
- log.error("TicketService.getTicketsBySession", e);
- throw new RossRepositoryException(e);
- } catch (Exception e) {
- log.error("TicketService.getTicketsBySession", e);
- throw new RossServiceException(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement