Skip to content

Commit

Permalink
Better name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgbutler committed Oct 28, 2024
1 parent df83f43 commit 3ddf8bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
package org.mybatis.dynamic.sql.render;

@FunctionalInterface
public interface Renderable<T, R> {
public interface Renderer<T, R> {
R render(T t);
}
20 changes: 10 additions & 10 deletions src/main/java/org/mybatis/dynamic/sql/render/RendererFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@
import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider;

public interface RendererFactory {
static Renderable<RenderingStrategy, DeleteStatementProvider> createDeleteRenderer(DeleteModel deleteModel,
StatementConfiguration statementConfiguration) {
static Renderer<RenderingStrategy, DeleteStatementProvider> createDeleteRenderer(DeleteModel deleteModel,
StatementConfiguration statementConfiguration) {
return renderingStrategy -> DeleteRenderer.withDeleteModel(deleteModel)
.withStatementConfiguration(statementConfiguration)
.withRenderingStrategy(renderingStrategy)
.build()
.render();
}

static <T> Renderable<RenderingStrategy, BatchInsert<T>> createBatchInsertRenderer(
static <T> Renderer<RenderingStrategy, BatchInsert<T>> createBatchInsertRenderer(
BatchInsertModel<T> batchInsertModel) {
return renderingStrategy -> BatchInsertRenderer.withBatchInsertModel(batchInsertModel)
.withRenderingStrategy(renderingStrategy)
.build()
.render();
}

static Renderable<RenderingStrategy, GeneralInsertStatementProvider> createGeneralInsertRenderer(
static Renderer<RenderingStrategy, GeneralInsertStatementProvider> createGeneralInsertRenderer(
GeneralInsertModel generalInsertModel, StatementConfiguration statementConfiguration) {
return renderingStrategy -> GeneralInsertRenderer.withInsertModel(generalInsertModel)
.withStatementConfiguration(statementConfiguration)
Expand All @@ -70,15 +70,15 @@ static Renderable<RenderingStrategy, GeneralInsertStatementProvider> createGener
.render();
}

static <T> Renderable<RenderingStrategy, InsertStatementProvider<T>> createInsertRenderer(
static <T> Renderer<RenderingStrategy, InsertStatementProvider<T>> createInsertRenderer(
InsertModel<T> insertModel) {
return renderingStrategy -> InsertRenderer.withInsertModel(insertModel)
.withRenderingStrategy(renderingStrategy)
.build()
.render();
}

static Renderable<RenderingStrategy, InsertSelectStatementProvider> createInsertSelectRenderer(
static Renderer<RenderingStrategy, InsertSelectStatementProvider> createInsertSelectRenderer(
InsertSelectModel insertSelectModel, StatementConfiguration statementConfiguration) {
return renderingStrategy -> InsertSelectRenderer.withInsertSelectModel(insertSelectModel)
.withStatementConfiguration(statementConfiguration)
Expand All @@ -87,15 +87,15 @@ static Renderable<RenderingStrategy, InsertSelectStatementProvider> createInsert
.render();
}

static <T> Renderable<RenderingStrategy, MultiRowInsertStatementProvider<T>> createMultiRowInsertRenderer(
static <T> Renderer<RenderingStrategy, MultiRowInsertStatementProvider<T>> createMultiRowInsertRenderer(
MultiRowInsertModel<T> multiRowInsertModel) {
return renderingStrategy -> MultiRowInsertRenderer.withMultiRowInsertModel(multiRowInsertModel)
.withRenderingStrategy(renderingStrategy)
.build()
.render();
}

static Renderable<RenderingStrategy, SelectStatementProvider> createMultiSelectRenderer(
static Renderer<RenderingStrategy, SelectStatementProvider> createMultiSelectRenderer(
MultiSelectModel multiSelectModel, StatementConfiguration statementConfiguration) {
return renderingStrategy -> new MultiSelectRenderer.Builder()
.withMultiSelectModel(multiSelectModel)
Expand All @@ -105,15 +105,15 @@ static Renderable<RenderingStrategy, SelectStatementProvider> createMultiSelectR
.render();
}

static Renderable<RenderingContext, SelectStatementProvider> createSelectRenderer(
static Renderer<RenderingContext, SelectStatementProvider> createSelectRenderer(
SelectModel selectModel) {
return renderingContext -> SelectRenderer.withSelectModel(selectModel)
.withRenderingContext(renderingContext)
.build()
.render();
}

static Renderable<RenderingStrategy, UpdateStatementProvider> createUpdateRenderer(
static Renderer<RenderingStrategy, UpdateStatementProvider> createUpdateRenderer(
UpdateModel updateModel, StatementConfiguration statementConfiguration) {
return renderingStrategy -> UpdateRenderer.withUpdateModel(updateModel)
.withStatementConfiguration(statementConfiguration)
Expand Down

0 comments on commit 3ddf8bd

Please sign in to comment.