At other times he would pretend to tickle the girl and put his hands inside her underwear to touch her bottom.
Ms Locke said the offending happened repeatedly while the girl was aged between 6 and 12 years old.
The court also heard a disturbing victim impact statement written by the young woman and read by Ms Locke.
She said she still gets nightmares about the offending and has trouble sleeping.
"I am terrified the offender will come in the middle of the night when I am asleep.''
She said her parents feel guilty because they never knew it was happening and could not protect her.
The woman also spoke of how Gubb's abuse effected her later in life.
She said she turned to drugs and alcohol. ``I also started self harming and cutting myself.''
The woman said she turned away from her family and friends because she didn't want anyone to find out about the offending.
Even now, as a teenager, she finds it hard to trust men and feels uncomfortable when she has to walk past men in the street.
"I do not trust men, so will probably never find someone to share my life with.''
Gubb's lawyer David Jones QC said his client did not realise the pain he had caused and was deeply sorry.
He said Gubb had sought help from a psychologist to deal with his problem and was also offering $5000 to the victim to help pay for counselling.
"There are issues to do with his own upbringing but he does not put those forward as a reason or an excuse for his offending.''
Mr Jones had argued for home detention but Judge Blackie said that would not be appropriate.
The judge said the victim was vulnerable and Gubb was in a position of trust. There was also an element of premeditation because of the repetitive offending.
"It didn't happen once or twice - it happened numerous times.''
Judge Blackie took time off Gubb's sentence for his early guilty plea and his remorse.
Gubb patted the police officer on the back and said thank you as he was led into the cells.