The above answer is incorrect, the distance described by that argument is not in kilometers (nore can you convert it into meters or kilometers with any accuracy if you are doing work at a high enough latitude). Remember, if use any of the spatial functions on longitude-latitude coordinates then you are effectively squishing the map into an equirectangle projection and then doing the calculations there.
DWITHIN is capable of doing calculations on a sphere, but only if you provide it geographic data, then it will accept meters as its unit of measure.
Hibernate Spatial does not support geographic types (this bug hasn't being resolved for 3 years, so don't hold your breath).
If you're using polygonal areas, then depending on where you are (the closer to the equator the better) and depending on the size of the area you are checking, distortion from the way the coordinates would be calculated would be fairly minimal with geometric coordinates.
So polygonal areas will more or less work ok with a little distortion.
Long story short, Hibernate Spatial doesn't support an easy way to store geographical data and perform operations on it. It supports the more advanced and difficult method of storing the data as a projection, and doing basic Cartesian math on that.
Edit: see @lreeder's updated answer which has being clarified.