You should write a generic transformation Service! Use generics to keep it type free (so you can convert every object to key=>value and back).
What field should be the key? Get that field from the bean and append any other non transient value in a value map.
The way back is pretty easy. Read key(x) and write at first the key and then every list entry back to a new object.
You can get the property names of a bean with the apache commons beanutils!