Package com.centraview.support.ticket

Examples of com.centraview.support.ticket.TicketLocal


  public void duplicateTicket(int userId, TicketVO tv)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      remote.duplicateTicket(userId, tv);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
      logger.error("[duplicateTicket]: Exception", e);
    }
  }
View Full Code Here


    int tktID = 0;

    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      tktID = remote.addTicket(userId, tv);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
      logger.error("[addTicket]: Exception", e);
    }
    return tktID;
View Full Code Here

  {
    int returnCode = 1;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.addThread(userId, thvo);
      returnCode = 0;
    } catch (Exception e) {
      logger.error("[addThread]: Exception", e);
    }
    return returnCode;
View Full Code Here

  {
    ThreadVO thVO = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      ctx.getUserTransaction().begin();
      remote.setDataSource(this.dataSource);
      thVO = remote.getThread(userId, threadId);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
      logger.error("[getThread]: Exception", e);
    }
    return thVO;
View Full Code Here

  {
    TicketVO tv = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      tv = remote.getTicketBasicRelations(userId, ticketId);
    } catch (CreateException ce) {
      throw new EJBException(ce);
    } catch (NamingException re) {
      throw new EJBException(re);
    }
View Full Code Here

  public void updateTicket(int userId, TicketVO tv)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      remote.updateTicket(userId, tv);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
      logger.error("[updateTicket]: Exception", e);
    }
  }
View Full Code Here

  {
    TicketVO tv = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      tv = remote.getTicketBasic(userId, ticketId);
    } catch (Exception e) {
      logger.error("[getTicketBasic]: Exception", e);
    }
    return tv;
  }
View Full Code Here

  public void delete(int userId, int ticketID) throws AuthorizationFailedException
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.deleteTicket(userId, ticketID);
    } catch (CreateException ce) {
      throw new EJBException(ce);
    } catch (NamingException re) {
      throw new EJBException(re);
    }
View Full Code Here

  public void addFile(int ticketId, int[] fileId)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.addTicketLink(ticketId, fileId, 33);
    } catch (Exception e) {
      logger.error("[addFile]: Exception", e);
    }
  }
View Full Code Here

  public void addExpense(int ticketId, int[] expenseId)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.addTicketLink(ticketId, expenseId, 89);
    } catch (Exception e) {
      logger.error("[addExpense]: Exception", e);
    }
  }
View Full Code Here

TOP

Related Classes of com.centraview.support.ticket.TicketLocal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.