code: 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;
  	}
docs: Delete metadata references with foreign keys to the metadata file id
  
  @param fileId
  file id
  @return deleted count
  @throws SQLException
  upon failure