I think it is possible. In our project we have a one-to-one relation that uses multiple non-primary key columns. Given that one-to-one relations usually have more restrictions than many-to-one associations I think it is possible.
Since we are only using xml mapping files in our project, I can only give you xml examples. Hopefully you will be able to convert it to annotations.
1. In your 'service' class you have to group together the properties that makes up the unique constraint. This is done with the <properties> mapping.
Code:
<properties name="service">
<property name="service_id" ...>
<property name="service_version" ...>
</properties>
2. In your 'service_details' class you have to do include the two foreign key columns in one <many-to-one> mapping:
Code:
<many-to-one
name="service"
property-ref="service"
....
>
<column name="service_id" ... />
<column name="service_version" ... />
</many-to-one>
The above should give you a uni-directional association from service_details to service. We are not mapping the inverse direction in our project, so I don't how easy/hard it is.