Ok now I know that I was wrong... I was trying to use JPA to save geolatte. (It works only with JTS)
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.postgresql.Driver"/>
<property name="url" value="jdbc:postgresql://localhost:5432/baza"/>
<property name="username" value="postgres"/>
<property name="password" value="123"/>
</bean>
GeolattePointEntity geolattePointEntity = new GeolattePointEntity();
org.geolatte.geom.Point point = new org.geolatte.geom.Point(Points.create3D(2.0, 2.3, 4.3));
geolattePointEntity.setGeolattePoint(point);
geolattePointEntity.setName("name");
SQLTemplates templates = new PostGISTemplates();
Configuration configuration = new Configuration(templates);
SQLQueryFactory factory = new SQLQueryFactory(configuration, dataSource);
SQLInsertClause insert = factory.insert(QGeolattepointentity.geolattepointentity);
insert.populate(geolattePointEntity).execute();
And then after
SQLQuery query = factory.query();
List<GeolattePointEntity> list = query.from(qGeolattePointEntity).list(qGeolattePointEntity);
GeolattePointEntity geo = list.get(0);
I get
Caused by: java.lang.ClassCastException: org.postgresql.util.PGobject cannot be cast to core.point.GeolattePointEntity