app/repository/ArtistRepository.java
public boolean isArtistAdmin(int profileId){
        if(ebeanServer.find(ArtistProfile.class).where().eq("profile_id", profileId).exists()){
            int artistID = ebeanServer.find(ArtistProfile.class).select("artistId").where().eq("profile_id", profileId).findSingleAttribute();
            return ebeanServer.find(Artist.class).where().eq("verified", 1).eq("soft_delete", 0).eq("artist_id", artistID).exists();
        };
            return false;
    }
/**
     * Checks if the given user's id is an admin of a currently verified artist.
     * This allows them to be able to make events.
     * @param profileId The id of the profile being checked.
     * @return True if the artist is an admin of a currently verified artist, else false.
     */
Checks if the given user's id is an admin of a currently verified artist.
This allows them to be able to make events.
@param profileId The id of the profile being checked.
@return True if the artist is an admin of a currently verified artist, else false.
Checks if the given user ' s id is an admin of a currently verified artist . This allows them to be able to make events . @param profileId The id of the profile being checked . @return True if the artist is an admin of a currently verified artist else false .
public boolean isArtistAdmin(int profileId){
        if(ebeanServer.find(ArtistProfile.class).where().eq("profile_id", profileId).exists()){
            int artistID = ebeanServer.find(ArtistProfile.class).select("artistId").where().eq("profile_id", profileId).findSingleAttribute();
            return ebeanServer.find(Artist.class).where().eq("verified", 1).eq("soft_delete", 0).eq("artist_id", artistID).exists();
        };
            return false;
    }
public boolean isArtistAdmin ( int profileId ) { if ( ebeanServer . find ( ArtistProfile . class ) . where ( ) . eq ( "profile_id" , profileId ) . exists ( ) ) { int artistID = ebeanServer . find ( ArtistProfile . class ) . select ( "artistId" ) . where ( ) . eq ( "profile_id" , profileId ) . findSingleAttribute ( ) ; return ebeanServer . find ( Artist . class ) . where ( ) . eq ( "verified" , 1 ) . eq ( "soft_delete" , 0 ) . eq ( "artist_id" , artistID ) . exists ( ) ; } ; return false ; }
Checks if the given user's id is an admin of a currently verified artist.
Checks if the given user ' s id is an admin of a currently verified artist .