A former schoolteacher from Donegal who sexually abused 19 young boys over a 25-year period will be sentenced later this year.