agave-metadata/metadata-core/src/main/java/org/iplantc/service/metadata/dao/MetadataSchemaPermissionDao.java
/**
     * Deletes the given iod permission.
     *
     * @param pem the permission to delete
     * @throws org.iplantc.service.metadata.exceptions.MetadataException
     */
Deletes the given iod permission.
@param pem the permission to delete
@throws org.iplantc.service.metadata.exceptions.MetadataException
Deletes the given iod permission . @param pem the permission to delete @throws org . iplantc . service . metadata . exceptions . MetadataException
public static void delete(MetadataSchemaPermission pem) throws MetadataException {
        if (pem == null)
            throw new MetadataException("Permission cannot be null");
        try {
            MongoCollection<MetadataSchemaPermission> metadataSchemaPermissionCollection;
            metadataSchemaPermissionCollection = getDefaultMetadataSchemaPermissionCollection();
            Bson deleteQuery = and(eq("schemaId", pem.getSchemaId()), eq("tenantId", pem.getTenantId()));
            DeleteResult deleteResult = metadataSchemaPermissionCollection.deleteOne(deleteQuery);
            if (deleteResult.getDeletedCount() == 0) {
            }
        } catch (MongoException ex) {
            throw new MetadataException("Failed to delete metadata schema permission.", ex);
        }
    }
public static void delete ( MetadataSchemaPermission pem ) throws MetadataException { if ( pem == null ) throw new MetadataException ( "Permission cannot be null" ) ; try { MongoCollection < MetadataSchemaPermission > metadataSchemaPermissionCollection ; metadataSchemaPermissionCollection = getDefaultMetadataSchemaPermissionCollection ( ) ; Bson deleteQuery = and ( eq ( "schemaId" , pem . getSchemaId ( ) ) , eq ( "tenantId" , pem . getTenantId ( ) ) ) ; DeleteResult deleteResult = metadataSchemaPermissionCollection . deleteOne ( deleteQuery ) ; if ( deleteResult . getDeletedCount ( ) == 0 ) { } } catch ( MongoException ex ) { throw new MetadataException ( "Failed to delete metadata schema permission." , ex ) ; } }
Deletes the given iod permission.
Deletes the given iod permission .
//delete unsuccessful //				return null;