The amount of emotional harm Parker had inflicted on the victims was "difficult to comprehend''.
"You have harmed the small community you were supposed to serve to an unimaginable degree,'' he said.
Justice Heath acknowledged the presence of the victims and their families in court, and the courage of those who read out their "harrowing'' victim impact statements.
He said to Parker: "I could not help but notice that when you were listening to the victim you did not have the courtesy to look him in the eye. You simply sat there holding your head in your hands.''
Ministry of Justice staff opened a second court room which streamed the hearing live on a big screen, to allow members of the public and media who could not fit into the main court room to see Parker handed his punishment.
Parker's lawyer Alex Witten-Hannah had submitted that a lengthy prison sentence would provide adequate protection for society, and it did not need to be the indefinite sentence of preventive detention.
"The test for Your Honour is not what is the risk now but what is the risk likely to be at the end of the sentence,'' he told Justice Heath.
Parker was "very distressed by his attraction to a certain age group'' and was motivated to get help.
Mr Witten-Hannah said that in 2009, when Parker was first investigated by police and "alarm bells rang'', he didn't confess to his crimes because "he felt that he had reached a point where he couldn't stop himself''.
"It tells us that the man has a sexual deviancy problem, and part of the tragedy is that there was not someone to whom he could turn for help.''
Justice Heath disagreed.
"It doesn't tell me that,'' he said.
"It tells me he was aware of his problem but was prepared to continue to do it rather than to admit it to the police and that he needed help.''
A weeping Parker held his head in his hands as the first of his victims read his statement to the court.
The boy said he first met Parker in 2008 and abuse occurred the next year.
"I told some of my own family members about it but they didn't believe me. They told me I was lying. I remembers them saying 'he wouldn't do that'. This made me start to hate my family because they believed you over me,'' he told Parker.
"Even now my relationships with family isn't good. I had a lot of anger inside and ended up smoking cigarettes and even weed to try and forget what you did to me.''
After he made an allegation against Parker, he and a mate were pulled out of class by Parker who said he could lose his job because of what the boy had been telling people, the court heard.
"It was hard going back into your class and I remembers crying and feeling like sh**. I remember even feeling bad inside like I had done something wrong.
"I even started to think if it was all a dream, because that's the only way I could deal with it by myself.
The boy said was bullied and teased at school, lost a lot of friends and even contemplated suicide because of what Parker did to him.
"I blame you for a lot of my sad feelings, for my anger.
"I think you're sick, eh.''
Another boy said Parker stole his childhood from him.
He said he loved being on his farm - working with animals and taking part in fun activities there.
"Every time I went to work on the farm I was worried he would do something to me. Often there were several boys there, but the abuse would only happen when I was there by myself.
"I would go home with a feeling of disgust and feeling dirty. I would spend a lot of time in the shower but even then I wouldn't feel clean.
"Jamie stole my childhood from me. I hate him for what he's done and I will never forgive him.
"Jamie had power and control over me, but no-one will ever be able to treat me like that again.''
One boy's mother told the court she knew Parker since he was 19-years-old and trusted him so much she sent her son to his farm every school holiday.
"My boy loved going to Jamie's but after one holiday he didn't want to go back but he wouldn't tell me why.''
She said she "almost died inside'' when she found what Parker had done to her boy.
"I want you to feel the pain that these boys and all the rest of us are feeling.''
The mother of another boy told the court that she had to try not to let thoughts of "this monster here'' from entering her head every day.
She said her children could no longer be at school because "they can't cope with the sadness''.
"They're teased and bullied at college because they have had the misfortune of knowing you. They have been punished for just knowing you. Isn't that just sick?''
Crown prosecutor Michael Smith submitted that Parker should be given a sentence of preventive detention because of the risk he posed to the community.
"[His offending is], in many respects, without comparison in New Zealand's history. It is without comparison and defies summary.''
Mr Smith said Parker's behaviour was only brought to an end by "these brave boys'' who came forward.
"Only when they spoke out, when they stepped forward, would he finally accept and admit what he had done. It was their bravery and their bravery alone that has brought a stop to this prisoner's behaviour.''
Parker had violated the school and its pupils and "abused and manipulated'' school staff, prominent Pamapuria kuia (elder) Waireti Walters told Radio New Zealand.
"And most of all he's destroyed the innocence of these young boys.''
His actions had brought a "dark cloud'' over the community, she said.
"The moment you say anything about the school, anything about Jamie Parker, you can see the hate comes over the face, the disgust, the violation of their faith - it's something we want to forget but it's still there.''
Ms Walters said in order for the community to move on, Parker needed to be punished for his crimes.
"That man, he's a poor excuse for a man.''
She said the future would be difficult for Parker's victims, the "poor, innocent little boys''.
"What will happen to them in 10 years, 15 years, when they have families, when they start growing up and going into relations? What's going to happen to those poor little souls?
"He used all our culture, he used our reo (language), he used our waiata (song), he used our marae. What for? For all those things he's done.''
Police first investigated Parker after receiving a complaint of indecent assault March 2009. He was placed on leave while an investigation took place, but the next month the allegation was retracted and he returned to teaching.
Nonetheless, police sent former principal Stephen Hovell a letter saying the sleepovers were inappropriate and had to stop.
"In my view it is clearly inappropriate for a school teacher to invite young children to their residence, outside of school hours, and have them sleeping over,'' Detective Dean Gorrie said in the letter.
"I would suggest that this practice must stop immediately, and protocols be initiated to discourage them from occurring in the future.''
Mr Hovell was sacked in February this year after an investigation found he had not heeded this advice, and had opted to protect his deputy instead of his students.
The investigation found Mr Hovell did nothing to manage the return to school of students who had complained about Parker, nor did he monitor Parker's activity after he began teaching again.
In August last year Parker pleaded guilty to 49 sexual abuse charges, which prompted more complainants to come forwards.
In April this year Parker admitted a further 25 charges, including five allegations of sexual violation involving two boys.
In all, the allegations involved 20 victims, aged 9 to 16 at the time, and dated from 1999 to 2012.
At a previous hearing in Kaitaia District Court, Judge Greg Davis said the sentencing was complex because: "I have not been able to find similar offending or a similar extent of offending.''
One of the officers involved in the police investigation, Detective Mark Dalzell, said when a complaint was raised about Parker in 2009 police did everything they could to address it, but the complaint was withdrawn.
"That included a comprehensive one-hour interview with one of the boys that originally came forward. Unfortunately, no evidence was obtained in that interview. If it had been, that evidence would have formed the cornerstone of an investigation.''
Parker also underwent a "robust'' interview by police at that time and was given every chance to confess but stoutly denied the allegations.
The tipping point came in 2012 when a boy, who in Mr Dalzell's view was "an absolute hero'', came forward.
"Without any support from any other complainants, he came forward and talked to us about what had happened.''
Police used the interview with him as the basis for their case, which Mr Dalzell said transpired to be the worst he had encountered.
Child, Youth and Family Te Tai Tokerau regional director Marion Heeney said it was clear to see the impact Parker's offending had had on some of the boys.
"Shame, anger, lack of trust, and that's manifesting itself in some behaviours that those boys are displaying, and understandably so.
"But you also saw today in court a lot of courage and a lot of mana from those boys and I think if we can support them as a community and get the right interventions in place they'll be okay.''