app/repository/ArtistRepository.java
private void checkToDeleteArtist(int artistId) {
        List<Integer> admins = ebeanServer.find(ArtistProfile.class).select("profileId").where().eq("artist_id", artistId).findSingleAttributeList();
        if (admins.isEmpty() || admins == null) {
            ebeanServer.find(Artist.class).where().eq("artist_id", artistId).delete();
        }
    }
/**
     * Method to delete an artist if the last admin has left
     *
     * @param artistId artist id to check
     */
Method to delete an artist if the last admin has left
@param artistId artist id to check
Method to delete an artist if the last admin has left @param artistId artist id to check
private void checkToDeleteArtist(int artistId) {
        List<Integer> admins = ebeanServer.find(ArtistProfile.class).select("profileId").where().eq("artist_id", artistId).findSingleAttributeList();
        if (admins.isEmpty() || admins == null) {
            ebeanServer.find(Artist.class).where().eq("artist_id", artistId).delete();
        }
    }
private void checkToDeleteArtist ( int artistId ) { List < Integer > admins = ebeanServer . find ( ArtistProfile . class ) . select ( "profileId" ) . where ( ) . eq ( "artist_id" , artistId ) . findSingleAttributeList ( ) ; if ( admins . isEmpty ( ) || admins == null ) { ebeanServer . find ( Artist . class ) . where ( ) . eq ( "artist_id" , artistId ) . delete ( ) ; } }
Method to delete an artist if the last admin has left
 @param artistId artist id to check
Method to delete an artist if the last admin has left @param artistId artist id to check