Offences allegedly occurred over a three-year period, court told