Hello,

I would like to use the generated Record-classes for easy reading and 
writing the entities from and to the database.
But I got a postgis.Point column in a table.
I tried to create an own GeometryTableField from CustomTableField but that 
failed at the point where the
constructor of the Field needs a DataType. Making an own DataType failed 
because the
DataType's constructor needs a SQLDataType<Point>. But I can't extend 
SQLDataType.

Here's the code:

public class GeometryDataField extends CustomField<Point>{

    private static final long serialVersionUID = 1L;

    protected GeometryDataField(String name, DataType<Point> type) {
        super(name, type);
    }
    @Override
    public void toSQL(RenderContext context) {
    }
    @Override
    public void bind(BindContext context) throws DataAccessException {
    }
}

and

public class GeometryDataType extends AbstractDataType< Point> {
    private static final long serialVersionUID = 1L;
    
    protected GeometryDataType(SQLDialect dialect, SQLDataType<Point> 
sqldatatype,
            Class<? extends Point> type, String typeName) {
        super(dialect, sqldatatype, type, typeName);
    }
}

There is no "SQLDataType<Point>" and the constructor of SQLDataType is 
private, furthermore the class is final.

Where can I find a description how to make TableFields for Postgis types or 
otherwise use the postgis.Point with Jooq ?

Greetings

Mike

Reply via email to