All prisoners in the county jail are not the same. The sheriff has control over prisoners who have been sentenced to the county jail following conviction of a misdemeanor or felony, and it is the sheriff who controls these prisoners' work and activities. The same is not true for prisoners who have been convicted of felonies and sentenced to the department of corrections and are only being held in the county jail pending transfer. Pursuant to T.C.A. § 40-35-212(d), the sentencing judge retains control over these prisoners and may place restrictions on their work and activities during the time they are housed in the county jail. The judge's jurisdiction continues until the prisoner is transferred into the physical custody of the department of correction.