I have below two Criteria -
Criteria searchCriteria = CriteriaFactory.And(ItemSchemaCriteria, PublicationCriteria);
finalCriteria = CriteriaFactory.And(andCriteria);
here andCriteria
is an array of some Keyword Criteria.
Now when I try to add these both criteria and assign it in another Criteria named myCriteria
the as below:
myCriteria = searchCriteria.addCriteria(finalCriteria);
Below compilation error comes:
"Type mismatch: cannot convert from void to Criteria"
NOTE: As I debug and found that both searchCriteria and finalCriteria are not NULL.
Could somebody give me some pointers here to fix this error?