public int deleteByMetadata ( long fileId ) throws SQLException { DeleteBuilder < MetadataReference , Void > db = deleteBuilder ( ) ; db . where ( ) . eq ( MetadataReference . COLUMN_FILE_ID , fileId ) ; int deleted = db . delete ( ) ; return deleted ; }
Delete metadata references with foreign keys to the metadata file id