org.jdbi.v3.sqlobject.customizer.BindBean Java Examples
The following examples show how to use
org.jdbi.v3.sqlobject.customizer.BindBean.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EndpointDAO.java From irontest with Apache License 2.0 | 5 votes |
@SqlUpdate("update endpoint set environment_id = :evId, name = :ep.name, type = :ep.type, " + "description = :ep.description, url = :ep.url, username = :ep.username, password = CASE " + "WHEN COALESCE(password, '') <> COALESCE(:ep.password, '') " + // encrypt only when password is changed "THEN ENCRYPT('AES', '" + ENDPOINT_PASSWORD_ENCRYPTION_KEY + "', STRINGTOUTF8(:ep.password)) " + "ELSE password END, " + "other_properties = :ep.otherProperties, updated = CURRENT_TIMESTAMP where id = :ep.id") void _update(@BindBean("ep") Endpoint endpoint, @Bind("evId") Long environmentId);
Example #2
Source File: PropertyExtractorDAO.java From irontest with Apache License 2.0 | 5 votes |
@SqlUpdate("update property_extractor set property_name = :propertyName, other_properties = :otherProperties, " + "updated = CURRENT_TIMESTAMP where id = :id") void update(@BindBean PropertyExtractor propertyExtractor);
Example #3
Source File: TeststepDAO.java From irontest with Apache License 2.0 | 5 votes |
/** * This method considers test step insertion from both Create (test step) button on UI and test case duplicating. * @param teststep * @param request * @param endpointId * @return */ @SqlUpdate("insert into teststep (testcase_id, sequence, type, request, api_request, endpoint_id, " + "other_properties) values (:t.testcaseId, " + "(select coalesce(max(sequence), 0) + 1 from teststep where testcase_id = :t.testcaseId), " + ":t.type, :request, :apiRequest, :endpointId, :t.otherProperties)") @GetGeneratedKeys long _insertWithoutName(@BindBean("t") Teststep teststep, @Bind("request") Object request, @Bind("endpointId") Long endpointId, @Bind("apiRequest") String apiRequest);
Example #4
Source File: TeststepDAO.java From irontest with Apache License 2.0 | 5 votes |
@SqlUpdate("insert into teststep (testcase_id, sequence, name, type, description, action, request, request_type, " + "request_filename, api_request, endpoint_id, endpoint_property, other_properties) values (:t.testcaseId, " + "select coalesce(max(sequence), 0) + 1 from teststep where testcase_id = :t.testcaseId, :t.name, " + ":t.type, :t.description, :t.action, :request, :requestType, :t.requestFilename, :apiRequest, " + ":endpointId, :t.endpointProperty, :t.otherProperties)") @GetGeneratedKeys long _insertWithName(@BindBean("t") Teststep teststep, @Bind("request") byte[] request, @Bind("requestType") String requestType, @Bind("apiRequest") String apiRequest, @Bind("endpointId") Long endpointId);
Example #5
Source File: TeststepDAO.java From irontest with Apache License 2.0 | 5 votes |
@SqlUpdate("update teststep set name = :t.name, description = :t.description, action = :t.action, request = :request, " + "request_type = :requestType, request_filename = :t.requestFilename, api_request = :apiRequest, " + "endpoint_id = :endpointId, endpoint_property = :t.endpointProperty, other_properties = :t.otherProperties, " + "updated = CURRENT_TIMESTAMP where id = :t.id") void _updateWithStringRequest(@BindBean("t") Teststep teststep, @Bind("request") Object request, @Bind("requestType") String requestType, @Bind("apiRequest") String apiRequest, @Bind("endpointId") Long endpointId);
Example #6
Source File: DataTableCellDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update datatable_cell set value = :cell.value, endpoint_id = :endpointId, updated = CURRENT_TIMESTAMP " + "where id = :cell.id") void update(@BindBean("cell") DataTableCell cell, @Bind("endpointId") Long endpointId);
Example #7
Source File: CarMakerDao.java From tutorials with MIT License | 4 votes |
@SqlBatch("insert") @GetGeneratedKeys List<Long> bulkInsert(@BindBean List<CarMaker> carMakers);
Example #8
Source File: CarMakerDao.java From tutorials with MIT License | 4 votes |
@SqlUpdate @GetGeneratedKeys Long insert(@BindBean CarMaker carMaker);
Example #9
Source File: CarModelDao.java From tutorials with MIT License | 4 votes |
@SqlBatch("insert") @GetGeneratedKeys List<Long> bulkInsert(@BindBean List<CarModel> models);
Example #10
Source File: CarModelDao.java From tutorials with MIT License | 4 votes |
@SqlUpdate("insert") @GetGeneratedKeys Long insert(@BindBean CarModel carModel);
Example #11
Source File: WorldJDBIImpl.java From FrameworkBenchmarks with BSD 3-Clause "New" or "Revised" License | 4 votes |
@SqlBatch("update world set randomNumber = :p.randomNumber where id = :p.id") @Transaction void update(@BindBean("p") World...worlds);
Example #12
Source File: PropertyExtractorDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("insert into property_extractor (teststep_id, property_name, type, other_properties) values " + "(:teststepId, :p.propertyName, :p.type, :p.otherProperties)") @GetGeneratedKeys long insert(@Bind("teststepId") long teststepId, @BindBean("p") PropertyExtractor propertyExtractor);
Example #13
Source File: UserDefinedPropertyDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update udp set name = :name, value = :value, updated = CURRENT_TIMESTAMP where id = :id") void update(@BindBean UserDefinedProperty udp);
Example #14
Source File: ArticleDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update article set title = :title, content = :content, updated = CURRENT_TIMESTAMP where id = :id") int update(@BindBean Article article);
Example #15
Source File: ArticleDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("insert into article (title, content) values (:title, :content)") @GetGeneratedKeys long insert(@BindBean Article article);
Example #16
Source File: TestcaseDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update testcase set name = :name, description = :description, " + "check_http_stubs_hit_order = :checkHTTPStubsHitOrder, updated = CURRENT_TIMESTAMP where id = :id") void update(@BindBean Testcase testcase);
Example #17
Source File: TestcaseDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("insert into testcase (name, description, parent_folder_id, check_http_stubs_hit_order) values (" + ":name, :description, :parentFolderId, :checkHTTPStubsHitOrder)") @GetGeneratedKeys long _insertWithName(@BindBean Testcase testcase);
Example #18
Source File: TestcaseDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("insert into testcase (description, parent_folder_id) values (:description, :parentFolderId)") @GetGeneratedKeys long _insertWithoutName(@BindBean Testcase testcase);
Example #19
Source File: TeststepDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update teststep set name = :t.name, description = :t.description, request_type = :requestType, " + "request_filename = :t.requestFilename, action = :t.action, endpoint_id = :endpointId, " + "endpoint_property = :t.endpointProperty, other_properties = :t.otherProperties, updated = CURRENT_TIMESTAMP " + "where id = :t.id") void _updateWithoutRequest(@BindBean("t") Teststep teststep, @Bind("requestType") String requestType, @Bind("endpointId") Long endpointId);
Example #20
Source File: AssertionDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update assertion set name = :a.name, other_properties = :a.otherProperties, " + "updated = CURRENT_TIMESTAMP where id = :a.id") void update(@BindBean("a") Assertion assertion);
Example #21
Source File: AssertionDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("insert into assertion (teststep_id, name, type, other_properties) values " + "(:a.teststepId, :a.name, :a.type, :a.otherProperties)") @GetGeneratedKeys long insert(@BindBean("a") Assertion assertion);
Example #22
Source File: EnvironmentDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update environment set name = :name, description = :description, updated = CURRENT_TIMESTAMP where id = :id") void update(@BindBean Environment environment);
Example #23
Source File: FolderDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("update folder set name = :name, description = :description, " + "updated = CURRENT_TIMESTAMP where id = :id") void update(@BindBean Folder folder);
Example #24
Source File: EndpointDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("insert into endpoint (environment_id, type, other_properties) values (:evId, :ep.type, :ep.otherProperties)") @GetGeneratedKeys long _insertManagedEndpoint(@BindBean("ep") Endpoint endpoint, @Bind("evId") long environmentId);
Example #25
Source File: DataTableCellDAO.java From irontest with Apache License 2.0 | 4 votes |
@SqlUpdate("insert into datatable_cell (column_id, row_sequence, value, endpoint_id) values (:columnId, " + ":cell.rowSequence, :cell.value, :endpointId)") void _insert(@Bind("columnId") long columnId, @BindBean("cell") DataTableCell cell, @Bind("endpointId") Long endpointId);
Example #26
Source File: BookJdbiDao.java From Hands-On-Reactive-Programming-in-Spring-5 with MIT License | 4 votes |
@SqlUpdate("INSERT INTO book(id, title) VALUES (:id, :title)") void insertBook(@BindBean Book book);
Example #27
Source File: DataTableColumnDAO.java From irontest with Apache License 2.0 | 2 votes |
/** * @param testcaseId * @param column * @param type for enum, name instead of value is bound by JDBI, so use a separate @Bind here instead of taking advantage of the @BindBean. * @return */ @SqlUpdate("insert into datatable_column (name, type, sequence, testcase_id) values (:c.name, :type, " + ":c.sequence, :testcaseId)") @GetGeneratedKeys long insert(@Bind("testcaseId") long testcaseId, @BindBean("c") DataTableColumn column, @Bind("type") String type);
Example #28
Source File: EndpointDAO.java From irontest with Apache License 2.0 | 2 votes |
/** * Here assuming endpoint.password is already encrypted. * @param endpoint * @return */ @SqlUpdate("insert into endpoint (name, type, description, url, username, password, other_properties) " + "values (:ep.name, :ep.type, :ep.description, :ep.url, :ep.username, :ep.password, :ep.otherProperties)") @GetGeneratedKeys long insertUnmanagedEndpoint(@BindBean("ep") Endpoint endpoint);