An 11-year-old child has been hospitalised after being stabbed at a primary school in Dublin.