I'm working on a jsf project(version 2.2).I have a geoJson object in javascript.The other side I have a column with type of geommetry(MultiPolygon,4326) in PostGIS. I'm using Hibernate 4.3.8 and Postgresql 9.3.
Geometry column definition in model class
@Type(type="org.hibernate.spatial.GeometryType")
@Column(name="geom")
private Polygon geom;
I've also included Hibernate Spatial 4.x to my project and I can access geojson string in managed bean. But I don't know how I can insert this geojson to my database. Probably I have to parse geojson and create polygon object from geojson coordinates and pass to my database. But I didn't succeed. What is the way of doing this?
Thanks in advance.