public static List<Annotation> getAllStocksAnnotationsFromDatabaseUntilYear(
BookSelection bookSelection, Integer lastYear,
ClientDomainType clientDomainType, SortingCriteria sortingCriteria) {
AnnotationsFilter annotationsFilter = AnnotationsFilter.emptyAnnotationsFilter();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yyyy");
Date dateTo;
try {
dateTo = simpleDateFormat.parse("31-12-"+lastYear);
annotationsFilter.setDateTo(dateTo);
} catch (ParseException e) {
//TODO: log error
e.printStackTrace();
}
Collection<Annotation> annotations = AnnotationsBusiness