app/repository/UndoStackRepository.java
public CompletionStage<Void> clearStack(int userId) {
        return supplyAsync(() -> {
            clearOutdatedRecords();
            List<UndoStack> undoStackList = getUsersStack(userId);

            for (UndoStack undoStack: undoStackList) {
                processStackItem(undoStack);
            }
            ebeanServer.find(UndoStack.class)
                    .where()
                    .eq("profile_id", userId)
                    .delete();
            return null;
        });
    }
/**
     * Method to remove all items from undoStack for a given user and calls for the appropriate object to be
     * hard deleted
     * @param userId id of the user who's stack will be cleared
     * @return null
     */
Method to remove all items from undoStack for a given user and calls for the appropriate object to be
hard deleted
@param userId id of the user who's stack will be cleared
@return null
Method to remove all items from undoStack for a given user and calls for the appropriate object to be hard deleted @param userId id of the user who ' s stack will be cleared @return null
public CompletionStage<Void> clearStack(int userId) {
        return supplyAsync(() -> {
            clearOutdatedRecords();
            List<UndoStack> undoStackList = getUsersStack(userId);
            for (UndoStack undoStack: undoStackList) {
                processStackItem(undoStack);
            }
            ebeanServer.find(UndoStack.class)
                    .where()
                    .eq("profile_id", userId)
                    .delete();
            return null;
        });
    }
public CompletionStage < Void > clearStack ( int userId ) { return supplyAsync ( ( ) -> { clearOutdatedRecords ( ) ; List < UndoStack > undoStackList = getUsersStack ( userId ) ; for ( UndoStack undoStack : undoStackList ) { processStackItem ( undoStack ) ; } ebeanServer . find ( UndoStack . class ) . where ( ) . eq ( "profile_id" , userId ) . delete ( ) ; return null ; } ) ; }
Method to remove all items from undoStack for a given user and calls for the appropriate object to be
 hard deleted
 @param userId id of the user who's stack will be cleared
 @return null
Method to remove all items from undoStack for a given user and calls for the appropriate object to be hard deleted @param userId id of the user who ' s stack will be cleared @return null