delete all rows from m:n table belonging to obj

@param cod
@param obj
967690
public void deleteMtoNImplementor(CollectionDescriptor cod, Object obj)
    {
        ClassDescriptor cld = pb.getDescriptorRepository().getDescriptorFor(obj.getClass());
        ValueContainer[] pkValues = pb.serviceBrokerHelper().getKeyValues(cld, obj);
        String[] pkColumns = cod.getFksToThisClass();
        String table = cod.getIndirectionTable();
        String deleteStmt = pb.serviceSqlGenerator().getDeleteMNStatement(table, pkColumns, null);
        pb.serviceJdbcAccess().executeUpdateSQL(deleteStmt, cld, pkValues, null);
    }
571747
public void removeMcToMCWMap(Object mc) {
        if (tc.isEntryEnabled()) {
            Tr.entry(this, tc, "removeMcToMCWMap");
        }
        mcToMCWMapWrite.lock();
        try {
            mcToMCWMap.remove(mc);
        } finally {
            mcToMCWMapWrite.unlock();
        }
        if (tc.isDebugEnabled()) {
            Tr.debug(this, tc, mcToMCWMap.size() + " connections remaining in mc to mcw table");
        }
        if (tc.isEntryEnabled()) {
            Tr.exit(this, tc, "removeMcToMCWMap");
        }
    }
112152
@Override
    public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue)
    {

        if (!isOpen())
        {
            throw new PersistenceException("PelopsClient is closed.");
        }

        RowDeletor rowDeletor = clientFactory.getRowDeletor(pool);
        rowDeletor.deleteRow(tableName,
                Bytes.fromByteBuffer(CassandraUtilities.toBytes(columnValue, columnValue.getClass())),
                getConsistencyLevel());

    }
1050053
public void deleteObject(Object object)
    {
        PersistenceBroker broker = null;
        try
        {
            broker = getBroker();
            broker.delete(object);
        }
        finally
        {
            if (broker != null) broker.close();
        }
    }
1243343
@Override
    public void deleteAll() throws LockingException {
        Connection conn = null;
        Statement stmnt = null;
        try {
            String sql = "DELETE FROM " + LOCK_TABLE;
            if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.deleteAll(): " + sql);

            conn = RDBMServices.getConnection();
            try {
                stmnt = conn.createStatement();
                int rc = stmnt.executeUpdate(sql);
                if (log.isDebugEnabled()) {
                    String msg = "Deleted " + rc + " locks.";
                    log.debug("RDBMEntityLockStore.deleteAll(): " + msg);
                }
            } finally {
                if (stmnt != null) stmnt.close();
            }
        } catch (SQLException sqle) {
            throw new LockingException("Problem deleting locks", sqle);
        } finally {
            RDBMServices.releaseConnection(conn);
        }
    }
1058539
private void doDelete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
    {
        //logger.info("DELETING " + obj);
        // object is not null
        if (obj != null)
        {
            obj = getProxyFactory().getRealObject(obj);
            /**
             * Kuali Foundation modification -- 8/24/2007
             */
            if ( obj == null ) return;
            /**
             * End of Kuali Foundation modification
             */
            /**
             * MBAIRD
             * 1. if we are marked for delete already, avoid recursing on this object
             *
             * arminw:
             * use object instead Identity object in markedForDelete List,
             * because using objects we get a better performance. I can't find
             * side-effects in doing so.
             */
            if (markedForDelete.contains(obj))
            {
                return;
            }
            
            ClassDescriptor cld = getClassDescriptor(obj.getClass());
            //BRJ: check for valid pk
            if (!serviceBrokerHelper().assertValidPkForDelete(cld, obj))
            {
                String msg = "Cannot delete object without valid PKs. " + obj;
                logger.error(msg);
                return;
            }
            
            /**
             * MBAIRD
             * 2. register object in markedForDelete map.
             */
            markedForDelete.add(obj);
            Identity oid = serviceIdentity().buildIdentity(cld, obj);

            // Invoke events on PersistenceBrokerAware instances and listeners
            BEFORE_DELETE_EVENT.setTarget(obj);
            fireBrokerEvent(BEFORE_DELETE_EVENT);
            BEFORE_DELETE_EVENT.setTarget(null);

            // now perform deletion
            performDeletion(cld, obj, oid, ignoreReferences);
 	  	 
            // Invoke events on PersistenceBrokerAware instances and listeners
            AFTER_DELETE_EVENT.setTarget(obj);
            fireBrokerEvent(AFTER_DELETE_EVENT);
            AFTER_DELETE_EVENT.setTarget(null);
 	  	 	
            // let the connection manager to execute batch
            connectionManager.executeBatchIfNecessary();
        }
    }
129555
public function DeleteAll($obj)
	{
		$fms = $this->GetFieldMaps(get_class($obj));
		$pk = $obj->GetPrimaryKeyName();
		$table = $fms[$pk]->TableName;

		$sql = "delete from `$table`";
		$returnval = $this->DataAdapter->Execute($sql);
		$obj->OnDelete(); // fire OnDelete event
		return $returnval;

	}
874521
public int deleteById(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException {
		if (mappedDelete == null) {
			mappedDelete = MappedDelete.build(dao, tableInfo);
		}
		int result = mappedDelete.deleteById(databaseConnection, id, objectCache);
		if (dao != null && !localIsInBatchMode.get()) {
			dao.notifyChanges();
		}
		return result;
	}
877525
@Override
	public void remove() {
		try {
			removeThrow();
		} catch (SQLException e) {
			closeQuietly();
			// unfortunately, can't propagate back the SQLException
			throw new IllegalStateException("Could not delete " + dataClass + " object " + last, e);
		}
	}
445526
def delete(table, where=(), **kwargs):
    """"""
    where = dict(where, **kwargs).items()
    sql, args = makeSQL("DELETE", table, where=where)
    return execute(sql, args).rowcount
53922
public int deleteObjects(DatabaseConnection databaseConnection, Collection<T> datas, ObjectCache objectCache)
			throws SQLException {
		// have to build this on the fly because the collection has variable number of args
		int result = MappedDeleteCollection.deleteObjects(dao, tableInfo, databaseConnection, datas, objectCache);
		if (dao != null && !localIsInBatchMode.get()) {
			dao.notifyChanges();
		}
		return result;
	}
582770
public String delete(final Object obj) {
    final PersistMeta meta = EntityUtil.getMeta(obj.getClass());
    return new SQL() {
      {
        DELETE_FROM(getTableName(meta, obj));
        WHERE("id=#{id}");
      }
    }.toString();
  }
787655
public boolean removeObject (Object object)
    {
        for (int i = 0; i < _size; i++) {
            if (_records[i].object == object) {
                // shift everything down
                System.arraycopy(_records, i+1, _records, i, _size-(i+1));
                // clear out the trailing reference
                _records[--_size] = null;
                return true;
            }
        }

        return false;
    }
1090444
public void deleteObject(final JsiiObjectRef objRef) {
        ObjectNode req = makeRequest("del", objRef);
        this.runtime.requestResponse(req);
    }
292048
private void removeFromTable(Node[] table, Node node) {
    int last = table.length - 1;
    table[node.index] = table[last];
    table[node.index].index = node.index;
    table[last] = null;
  }
182744
@Override
	public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
		objectService.deleteObject(repositoryId, objectId, allVersions, extension);
	}
1172951
@NonNull
  public static DeleteSelection deleteFrom(@NonNull String table) {
    return deleteFrom(CqlIdentifier.fromCql(table));
  }