Upvote:3
Thai Airways and Air China are both in the Star Alliance. As such (and sometimes in other cases as well), you may be able to check your bag through at bag drop in China by showing your connecting ticket, although this is far from being a given (contact Air China if you want a definite answer). If this is available, you should be able to obtain your connecting boarding pass at the transfer desk in Bangkok Airport.
If this is not available, you will need to pick up your bag in Bangkok, clear Thai customs and immigration, check in again, and make your way through security to airside again. Four hours should be enough for this, but obviously you would want to avoid the hassle...