Detention is of two types, namely, punitive and preventive.