java.lang.Object
org.simpleflatmapper.jdbc.CrudDSL<T,K>
-
Constructor Summary
ConstructorsConstructorDescriptionCrudDSL(org.simpleflatmapper.reflect.meta.ClassMeta<T> target, org.simpleflatmapper.reflect.meta.ClassMeta<K> keyTarget, JdbcMapperFactory jdbcMapperFactory) -
Method Summary
Modifier and TypeMethodDescriptioncrud()Create a crud that will validate on the first interaction with a connection.Create a crud against the specified table that will validate on the first interaction with a connection.table(Connection connection, String table) Create a crud against the specified table validating it against the specified connection.table(DataSource dataSource, String table) Create a connected crud against the specified table validating it against the specified datasource.to(Connection connection) Create a connected crud validating it against the specified connection.to(DataSource dataSource) Create a connected crud validating it against the specified datasource.
-
Constructor Details
-
CrudDSL
public CrudDSL(org.simpleflatmapper.reflect.meta.ClassMeta<T> target, org.simpleflatmapper.reflect.meta.ClassMeta<K> keyTarget, JdbcMapperFactory jdbcMapperFactory)
-
-
Method Details
-
crud
Create a crud that will validate on the first interaction with a connection. The table name is derived from the jpa annotation or from the class name.- Returns:
- a new crud instance
-
table
Create a crud against the specified table that will validate on the first interaction with a connection.- Parameters:
table- the table name- Returns:
- a new crud instance
-
table
Create a crud against the specified table validating it against the specified connection.- Parameters:
connection- the connectiontable- the table- Returns:
- a new crud instance
- Throws:
SQLException- if an error occurred
-
table
Create a connected crud against the specified table validating it against the specified datasource.- Parameters:
dataSource- the datasourcetable- the table- Returns:
- a new crud instance
- Throws:
SQLException- if an error occurred
-
to
Create a connected crud validating it against the specified datasource. The table name is derived from the jpa annotation or from the class name.- Parameters:
dataSource- the datasource- Returns:
- a new crud instance
- Throws:
SQLException- if an error occurred
-
to
Create a connected crud validating it against the specified connection. The table name is derived from the jpa annotation or from the class name.- Parameters:
connection- the connection- Returns:
- a new crud instance
- Throws:
SQLException- if an error occurred
-