I am building a small application which uses postgres and has a couple of tables which have a postgis polygon as one of their columns. I was thinking of using a Geotools DataStore rather than querying it directly through SQL, so that I can take advantage of the library tools (and potentially be able to change to a different DataStore easily if needed.)
I am trying to understand how to get Geotools to know my Schema and which columns it should consider as attributes to my features. All the examples I found in the documentation just set the database URL, username, password, database name etc. but nothing about the tables to extract the features from.
How do I tell the PostGIS Plugin how to extract the polygons and attributes from my database?
Alternatively, does Geotools expect a table with a certain name and certain structure? If yes where can I find the information about what it expects?