I googled for solutions or examples, but all I can find is that JPA does not support displaying custom data types. Is it still in JPA 2.0?
Yes. Therefore, you will have to rely on certain extensions. For Hibernate, the Hibernate Spatial project provides ready-to-use spatial dialects and custom types:
Hibernate Spatial is a common extension for Hibernate to process geographic data. Hibernate Spatial is open source and licensed, such as Hibernate, under the LGPL license.
Hibernate Spatial allows you to deal with geographic data in a standardized way. It abstracts from a specific way to support a geographic database and a standardized, cross-domain interface for storing geographic data and feature requests.
Hibernate Spatial supports most of the simple function function of the OGC specification. Supported databases are: Oracle 10g / 11g, Postgresql / Postgis, Microsoft SQL Server and MySQL.
Pascal thivent
source share