tags:

views:

54

answers:

1

I have a Address bean that have a LatLng component. Please tell me how can i project that component and transform it in to a new class.

Thank you.

+2  A: 

As far as I understand your concern, you want to create a separate class for LatLng, something like below.

public class LatLng {
}

And then want to include that in your entity Address bean, like below.

public class Address {
   private LatLng latLng;
}

Now, have a look at Custom value types in Hibernate and Mapping custom type in Hibernate.

Adeel Ansari