/*
(non-Javadoc) object

@see com.impetus.kundera.client.Client#delete(java.lang.Object,
java.lang.Object)
971675
@Override
    public void delete(Object entity, Object pKey)
    {
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entity.getClass());
        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                entityMetadata.getPersistenceUnit());
        AbstractManagedType managedType = (AbstractManagedType) metaModel.entity(entityMetadata.getEntityClazz());

        DBObject query = new BasicDBObject();

        if (managedType.hasLobAttribute())
        {
            KunderaGridFS gfs = new KunderaGridFS(mongoDb, entityMetadata.getTableName());
            String id = ((AbstractAttribute) entityMetadata.getIdAttribute()).getJPAColumnName();
            query.put("metadata." + id, pKey);
            gfs.remove(query);
        }

        else
        {
            if (metaModel.isEmbeddable(entityMetadata.getIdAttribute().getBindableJavaType()))
            {
                MongoDBUtils.populateCompoundKey(query, entityMetadata, metaModel, pKey);
            }
            else
            {
                query.put("_id", MongoDBUtils.populateValue(pKey, pKey.getClass()));
            }
            // For secondary tables.
            List<String> secondaryTables = ((DefaultEntityAnnotationProcessor) managedType.getEntityAnnotation())
                    .getSecondaryTablesName();
            secondaryTables.add(entityMetadata.getTableName());

            for (String collectionName : secondaryTables)
            {
                KunderaCoreUtils.printQuery("Drop existing collection:" + query, showQuery);
                DBCollection dbCollection = mongoDb.getCollection(collectionName);
                dbCollection.remove(query, getWriteConcern(), encoder);
            }

            getIndexManager().remove(entityMetadata, entity, pKey);
        }
    }
559263
@SuppressWarnings("unchecked")
	@Override
	public int delete(final Object entity) {
		@SuppressWarnings("rawtypes")
		EntityHandler handler = this.getEntityHandler();
		if (!handler.getEntityType().isInstance(entity)) {
			throw new IllegalArgumentException("Entity type not supported");
		}

		try {
			Class<?> type = entity.getClass();
			TableMetadata metadata = handler.getMetadata(this.transactionManager, type);
			SqlContext context = handler.createDeleteContext(this, metadata, type, true);
			context.setSqlKind(SqlKind.DELETE);
			handler.setDeleteParams(context, entity);
			return handler.doDelete(this, context, entity);
		} catch (SQLException e) {
			throw new EntitySqlRuntimeException(SqlKind.DELETE, e);
		}
	}
1291621
public <T> void delete(T entity) {
		if (entity == null) {
			throw new ApitraryOrmException("Cannot delete null entity");
		}

		log.debug("Deleting " + entity.getClass());

		DeleteRequest request = new DeleteRequest();
		request.setEntity(resolveApitraryEntity(entity));
		String id = resolveApitraryEntityId(entity);
		request.setId(id);

		new CascadeDeleteCapable(this).deleteCascades(entity);

		DeleteResponse response = resolveApitraryClient().send(request);
		if (HttpStatus.OK.ordinal() != response.getStatusCode()) {
			if (HttpStatus.Not_Found.ordinal() == response.getStatusCode()) {
				throw new ApitraryOrmDeleteException("Object with id " + id + " does not exist.");
			} else {
				String statusMessage = (String) new DeleteResponseUnmarshaller().unMarshall(response, entity);
				throw new ApitraryOrmDeleteException(statusMessage);
			}
		}
	}
391162
public int del(String tableName, String field, Object value) throws SQLException {
		return del(Entity.create(tableName).set(field, value));
	}
80660
@Override
    protected void delete(Object entity, Object pKey)
    {
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entity.getClass());
        String id = generateJsonDocId(entityMetadata.getTableName(), pKey.toString());
        bucket.remove(id);
        LOGGER.debug("Deleted document with ID : " + id + " from the " + bucket.name() + " Bucket");
    }
595098
public void deleteObject(String key) throws QiniuException {
    com.qiniu.http.Response response = mBucketManager.delete(mBucketName, key);
    response.close();
  }
1059605
@Override
    public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue)
    { // TODO Auto-generated method stub

    }
1369967
@SuppressWarnings("UNCHECKED_CAST")
    public void delete(Class clazz, Object identifier) {

        EntityManager entityManager = null;
        try {
            entityManager = entityManagers.poll();
            entityManager.getTransaction().begin();
            try {

                @SuppressWarnings("unchecked") Object object = entityManager.find(clazz, identifier);
                entityManager.remove(object);
                entityManager.getTransaction().commit();
            } catch (Exception e) {
                e.printStackTrace();
                entityManager.getTransaction().rollback();
            }
        } finally {
            if(entityManager != null)
                entityManagers.add(entityManager);
        }
    }
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;
	}
696834
public Delete delete(Delete delete) {
    delete.deleteColumns(QueueEntryRow.COLUMN_FAMILY, consumerStateColumn);
    return delete;
  }
8681
@Override
    public void delete(final T value) {
        if (value != null) {
            final String id = value.getId();
            if (!StringUtils.isEmpty(id)) {
                doDelete(id);
                notifyDeleted(value);
            }
        }
    }
998795
public void remove (Object object) {
		if (!idToObject.containsValue(object, true)) return;
		int objectID = idToObject.findKey(object, true, -1);
		idToObject.remove(objectID);
		objectToID.remove(object, 0);
		if (TRACE) trace("kryonet", "Object " + objectID + " removed from ObjectSpace: " + object);
	}
602523
public boolean deleteEntity(Entity entity) {
        String entityName = entity.getName();
        checkEntityIsEmpty(entityName);
        QueryPart<Entity> queryPart = new Query<Entity>("entities")
                .path(entityName, true);
        return httpClientManager.updateMetaData(queryPart, delete());
    }
111658
public void delete(Object po) throws Exception{
		
		SqlParamsPairs sqlAndParams = ModelSqlUtils.getDeleteFromObject(po);
		//动态切换库名
		String sql = sqlAndParams.getSql();
		
		getProxy().update(sql, sqlAndParams.getParams());	
	}
984507
public T delete(String entityId, MnoHttpClient httpClient) throws AuthenticationException, ApiException {
		String jsonBody = httpClient.delete(getInstanceUrl(entityId));

		Type parsingType = new MnoAccountResponseParameterizedType(entitityClass);
		MnoAccountResponse<T> resp = GSON.fromJson(jsonBody, parsingType);

		return resp.getData();
	}
1172167
@Override
	public int delete(Extensions extensions) throws SQLException {

		DeleteBuilder<Extensions, Void> db = deleteBuilder();

		setUniqueWhere(db.where(), extensions.getExtensionName(), true,
				extensions.getTableName(), true, extensions.getColumnName());

		int deleted = db.delete();

		return deleted;
	}
1265552
@Override
    public void delete(ZooPC obj) {
    	if (obj.getClass() == GenericObject.class) {
    		throw new IllegalArgumentException();
//    		deleteGeneric((GenericObject) obj);
//    		return;
    	}
    	
        if (!isStarted) {
            this.sie = node.getSchemaIE(cls);
            isStarted = true;
        }

        //updated index
        //This is buffered to reduce look-ups to find field indices.
        buffer[bufferCnt++] = obj;
        if (bufferCnt == BUFFER_SIZE) {
            flushBuffer();
        }
    }