Delete ticket granting tickets int.

@param ticketId the ticket id
@return the int
12425
private int deleteTicketGrantingTickets(final String ticketId) {
        var totalCount = 0;

        val st = this.ticketCatalog.find(ServiceTicket.PREFIX);

        val sql1 = String.format("delete from %s s where s.ticketGrantingTicket.id = :id", getTicketEntityName(st));
        var query = entityManager.createQuery(sql1);
        query.setParameter("id", ticketId);
        totalCount += query.executeUpdate();

        val tgt = this.ticketCatalog.find(TicketGrantingTicket.PREFIX);
        val sql2 = String.format("delete from %s s where s.ticketGrantingTicket.id = :id", getTicketEntityName(tgt));
        query = entityManager.createQuery(sql2);
        query.setParameter("id", ticketId);
        totalCount += query.executeUpdate();

        val sql3 = String.format("delete from %s t where t.id = :id", getTicketEntityName(tgt));
        query = entityManager.createQuery(sql3);
        query.setParameter("id", ticketId);
        totalCount += query.executeUpdate();

        return totalCount;
    }
1319470
public BoxRequestsFolder.DeleteFolder getDeleteRequest(String id) {
        BoxRequestsFolder.DeleteFolder request = new BoxRequestsFolder.DeleteFolder(id, getFolderInfoUrl(id), mSession);
        return request;
    }
144919
def delete_session(self, ticket):
        '''
        
        '''
        assert isinstance(self.session_storage_adapter, CASSessionAdapter)
        logging.debug('[CAS] Deleting session for ticket {}'.format(ticket))
        self.session_storage_adapter.delete(ticket)
701124
public boolean removeUserById(int id) {
		Iterator<User> it = users.iterator();
		while (it.hasNext())
			if (it.next().getId() == id) {
				it.remove();
				return true;
			}
		return false;
	}
1171305
protected int cleanInternal() {
        try (val expiredTickets = ticketRegistry.getTicketsStream().filter(Ticket::isExpired)) {
            val ticketsDeleted = expiredTickets
                .mapToInt(this::cleanTicket)
                .sum();
            LOGGER.info("[{}] expired tickets removed.", ticketsDeleted);
            return ticketsDeleted;
        }
    }
851240
public T remove(final int id) {
        final T n = get(id);
        if (n != null) {
            notificationArray.remove(id);
            return n;
        }

        return null;
    }
913895
public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $ticket = $this->Tickets->get($id);
        if ($this->Tickets->delete($ticket)) {
            $this->Flash->success(__('The ticket has been deleted.'));
        } else {
            $this->Flash->error(__('The ticket could not be deleted. Please, try again.'));
        }

        return $this->redirect(['action' => 'index']);
    }
131338
public function destroy(Ticket $ticket)
    {
        $this->authorize('delete', $ticket);
        $ticket->deleteMessages();
        $ticket->delete();

        return redirect()->route('laralum::tickets.index');
    }
335863
public int deleteByIdCascade(String id, boolean userTable)
			throws SQLException {
		int count = 0;
		if (id != null) {
			Contents contents = queryForId(id);
			if (contents != null) {
				count = deleteCascade(contents, userTable);
			} else if (userTable) {
				dropTable(id);
			}
		}
		return count;
	}
820595
public OvhTicket tickets_ticketId_GET(Long ticketId) throws IOException {
		String qPath = "/support/tickets/{ticketId}";
		StringBuilder sb = path(qPath, ticketId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhTicket.class);
	}
1141932
public static void delete(final String id) throws AppPlatformException, IOException {
        assert(id != null);
        final BandwidthClient client = BandwidthClient.getInstance();
        client.delete(client.getUserResourceInstanceUri(BandwidthConstants.DOMAINS_URI_PATH, id));
    }
614086
public final synchronized void removeId(long id)
	{
		if (tc.isEntryEnabled()) Tr.entry(tc, "removeId", new Long(id));

		_idMap.remove(id);

		if (tc.isEntryEnabled()) Tr.exit(tc, "removeId");
	}
191907
public function delTicket($type = 'jsapi', $appid = null)
    {
        is_null($appid) && $appid = $this->config->get('appid');
        $cache_name = "{$appid}_ticket_{$type}";
        Tools::delCache($cache_name);
    }
1195060
public int remove(String id) throws Exception
    {
        id = Preconditions.checkNotNull(id, "id cannot be null");

        queue.checkState();

        int     count = 0;
        for ( String name : queue.getChildren() )
        {
            if ( parseId(name).id.equals(id) )
            {
                if ( queue.tryRemove(name) )
                {
                    ++count;
                }
            }
        }

        return count;
    }
439712
protected String produceTicketIdentifier(final Authentication authentication) {
        var tgtId = this.ticketGrantingTicketUniqueTicketIdGenerator.getNewTicketId(TicketGrantingTicket.PREFIX);
        if (this.cipherExecutor != null) {
            LOGGER.trace("Attempting to encode ticket-granting ticket [{}]", tgtId);
            tgtId = this.cipherExecutor.encode(tgtId);
            LOGGER.trace("Encoded ticket-granting ticket id [{}]", tgtId);
        }
        return tgtId;
    }
389035
public static void deleteQueue(DbConn cnx, int id)
    {
        int countRunning = cnx.runSelectSingle("ji_select_count_by_queue", Integer.class, id);
        if (countRunning > 0)
        {
            cnx.setRollbackOnly();
            throw new JqmAdminApiUserException(
                    "cannot delete a queue with running instances. Disable it, wait for the end of all running instances, then retry.");
        }

        cnx.runUpdate("dp_delete_for_queue", id);
        QueryResult qr = cnx.runUpdate("q_delete_by_id", id);
        if (qr.nbUpdated != 1)
        {
            cnx.setRollbackOnly();
            throw new JqmAdminApiUserException("no item with ID " + id);
        }
    }
1088265
public ArrayList<OvhMessage> tickets_ticketId_messages_GET(Long ticketId) throws IOException {
		String qPath = "/support/tickets/{ticketId}/messages";
		StringBuilder sb = path(qPath, ticketId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t1);
	}