Conditions for the existence of bound states of a Dirac particle in one dimension