app/repository/ArtistRepository.java
public CompletionStage<Optional<ArrayList<Integer>>> followArtist(int artId, int profileId) {
        return supplyAsync(() -> {
            String updateQuery = "INSERT into follow_artist(profile_id, artist_id) values (?, ?)";
            SqlUpdate query = Ebean.createSqlUpdate(updateQuery);
            query.setParameter(1, profileId);
            query.setParameter(2, artId);
            query.execute();
            return getFollowedArtistIds(profileId);
        });
    }
/**
     * Method to follow a artist for a user
     *
     * @param artId    Id of the entered artist
     * @param profileId Id of the entered profile
     * @return Optional array of integers of the followed artist id
     */
Method to follow a artist for a user
@param artId    Id of the entered artist
@param profileId Id of the entered profile
@return Optional array of integers of the followed artist id
Method to follow a artist for a user @param artId Id of the entered artist @param profileId Id of the entered profile @return Optional array of integers of the followed artist id
public CompletionStage<Optional<ArrayList<Integer>>> followArtist(int artId, int profileId) {
        return supplyAsync(() -> {
            String updateQuery = "INSERT into follow_artist(profile_id, artist_id) values (?, ?)";
            SqlUpdate query = Ebean.createSqlUpdate(updateQuery);
            query.setParameter(1, profileId);
            query.setParameter(2, artId);
            query.execute();
            return getFollowedArtistIds(profileId);
        });
    }
public CompletionStage < Optional < ArrayList < Integer > > > followArtist ( int artId , int profileId ) { return supplyAsync ( ( ) -> { String updateQuery = "INSERT into follow_artist(profile_id, artist_id) values (?, ?)" ; SqlUpdate query = Ebean . createSqlUpdate ( updateQuery ) ; query . setParameter ( 1 , profileId ) ; query . setParameter ( 2 , artId ) ; query . execute ( ) ; return getFollowedArtistIds ( profileId ) ; } ) ; }
Method to follow a artist for a user
 @param artId    Id of the entered artist
 @param profileId Id of the entered profile
 @return Optional array of integers of the followed artist id
Method to follow a artist for a user @param artId Id of the entered artist @param profileId Id of the entered profile @return Optional array of integers of the followed artist id