Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mapper constructors public. #382

Merged
merged 1 commit into from Jul 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -85,6 +85,7 @@ internal class MapperSpec private constructor(private val nameAllocators: Mutabl
.addField(creatorType, Table.CREATOR_FIELD, Modifier.PRIVATE, Modifier.FINAL)

val constructor = MethodSpec.constructorBuilder()
.addModifiers(Modifier.PUBLIC)
.addParameter(creatorType, Table.CREATOR_FIELD)
.addStatement("this.${Table.CREATOR_FIELD} = ${Table.CREATOR_FIELD}")

Expand Down
Expand Up @@ -38,7 +38,7 @@ interface Select_stuffCreator<T extends Select_stuffModel> {
final class Select_stuffMapper<T extends Select_stuffModel> implements RowMapper<T> {
private final Select_stuffCreator<T> creator;

Select_stuffMapper(Select_stuffCreator<T> creator) {
public Select_stuffMapper(Select_stuffCreator<T> creator) {
this.creator = creator;
}

Expand Down
Expand Up @@ -58,7 +58,7 @@ interface Some_selectCreator<T extends Some_selectModel> {
final class Some_selectMapper<T extends Some_selectModel> implements RowMapper<T> {
private final Some_selectCreator<T> creator;

Some_selectMapper(Some_selectCreator<T> creator) {
public Some_selectMapper(Some_selectCreator<T> creator) {
this.creator = creator;
}

Expand Down
Expand Up @@ -74,7 +74,7 @@ final class Other_selectMapper<V1 extends View1Model, T2 extends Test1Model, T e

private final View1Creator<V1> view1Creator;

Other_selectMapper(Other_selectCreator<V1, T2, T> creator, Factory<T2> test1ModelFactory, View1Creator<V1> view1Creator) {
public Other_selectMapper(Other_selectCreator<V1, T2, T> creator, Factory<T2> test1ModelFactory, View1Creator<V1> view1Creator) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
this.view1Creator = view1Creator;
Expand Down Expand Up @@ -114,7 +114,7 @@ final class Same_viewMapper<V1 extends View1Model, T extends Same_viewModel<V1>>

private final View1Creator<V1> view1Creator;

Same_viewMapper(Same_viewCreator<V1, T> creator, View1Creator<V1> view1Creator) {
public Same_viewMapper(Same_viewCreator<V1, T> creator, View1Creator<V1> view1Creator) {
this.creator = creator;
this.view1Creator = view1Creator;
}
Expand Down Expand Up @@ -150,7 +150,7 @@ interface View1Creator<T extends View1Model> {
final class View1Mapper<T extends View1Model> implements RowMapper<T> {
private final View1Creator<T> creator;

View1Mapper(View1Creator<T> creator) {
public View1Mapper(View1Creator<T> creator) {
this.creator = creator;
}

Expand Down
Expand Up @@ -118,7 +118,7 @@ final class Other_selectMapper<T1 extends Test2Model, V2 extends Test1Model.View

private final Test1Model.View1Creator<V2> view1Creator;

Other_selectMapper(Other_selectCreator<T1, V2, T> creator, Factory<T1> test2ModelFactory, Test1Model.View1Creator<V2> view1Creator) {
public Other_selectMapper(Other_selectCreator<T1, V2, T> creator, Factory<T1> test2ModelFactory, Test1Model.View1Creator<V2> view1Creator) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
this.view1Creator = view1Creator;
Expand Down Expand Up @@ -164,7 +164,7 @@ final class Multiple_view_selectMapper<V1T1 extends Test2Model, V1 extends Test2

private final Multiple_tablesCreator<V2T1, V1T1, V2> multiple_tablesCreator;

Multiple_view_selectMapper(Multiple_view_selectCreator<V1T1, V1, V2T1, V2, T> creator, Factory<V1T1> test2ModelFactory, Test2_copyCreator<V1T1, V1> test2_copyCreator, Test1Model.Factory<V2T1> test1ModelFactory, Multiple_tablesCreator<V2T1, V1T1, V2> multiple_tablesCreator) {
public Multiple_view_selectMapper(Multiple_view_selectCreator<V1T1, V1, V2T1, V2, T> creator, Factory<V1T1> test2ModelFactory, Test2_copyCreator<V1T1, V1> test2_copyCreator, Test1Model.Factory<V2T1> test1ModelFactory, Multiple_tablesCreator<V2T1, V1T1, V2> multiple_tablesCreator) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
this.test2_copyCreator = test2_copyCreator;
Expand Down Expand Up @@ -219,7 +219,7 @@ final class Views_and_columns_selectMapper<V1 extends Test1Model.View1Model, T e

private final Test1Model.View1Creator<V1> view1Creator;

Views_and_columns_selectMapper(Views_and_columns_selectCreator<V1, T> creator, Test1Model.View1Creator<V1> view1Creator) {
public Views_and_columns_selectMapper(Views_and_columns_selectCreator<V1, T> creator, Test1Model.View1Creator<V1> view1Creator) {
this.creator = creator;
this.view1Creator = view1Creator;
}
Expand Down Expand Up @@ -267,7 +267,7 @@ final class Select_from_sub_viewMapper<V1V1 extends Test1Model.View1Model, V1 ex

private final Test2_copyCreator<V2T1, V2> test2_copyCreator;

Select_from_sub_viewMapper(Select_from_sub_viewCreator<V1V1, V1, V2T1, V2, T> creator, Sub_viewCreator<V1V1, V1> sub_viewCreator, Test1Model.View1Creator<V1V1> view1Creator, Factory<V2T1> test2ModelFactory, Test2_copyCreator<V2T1, V2> test2_copyCreator) {
public Select_from_sub_viewMapper(Select_from_sub_viewCreator<V1V1, V1, V2T1, V2, T> creator, Sub_viewCreator<V1V1, V1> sub_viewCreator, Test1Model.View1Creator<V1V1> view1Creator, Factory<V2T1> test2ModelFactory, Test2_copyCreator<V2T1, V2> test2_copyCreator) {
this.creator = creator;
this.sub_viewCreator = sub_viewCreator;
this.view1Creator = view1Creator;
Expand Down Expand Up @@ -374,7 +374,7 @@ interface Test2_projectionCreator<T extends Test2_projectionModel> {
final class View1Mapper<T extends Test1Model.View1Model> implements RowMapper<T> {
private final Test1Model.View1Creator<T> creator;

View1Mapper(Test1Model.View1Creator<T> creator) {
public View1Mapper(Test1Model.View1Creator<T> creator) {
this.creator = creator;
}

Expand All @@ -393,7 +393,7 @@ final class Test2_copyMapper<T1 extends Test2Model, T extends Test2_copyModel<T1

private final Factory<T1> test2ModelFactory;

Test2_copyMapper(Test2_copyCreator<T1, T> creator, Factory<T1> test2ModelFactory) {
public Test2_copyMapper(Test2_copyCreator<T1, T> creator, Factory<T1> test2ModelFactory) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
}
Expand All @@ -416,7 +416,7 @@ final class Projection_viewMapper<T extends Projection_viewModel, T1 extends Tes

private final Test1Model.Factory<T1> test1ModelFactory;

Projection_viewMapper(Projection_viewCreator<T> creator, Test1Model.Factory<T1> test1ModelFactory) {
public Projection_viewMapper(Projection_viewCreator<T> creator, Test1Model.Factory<T1> test1ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
}
Expand All @@ -436,7 +436,7 @@ final class Test2_projectionMapper<T extends Test2_projectionModel, T1 extends T

private final Factory<T1> test2ModelFactory;

Test2_projectionMapper(Test2_projectionCreator<T> creator, Factory<T1> test2ModelFactory) {
public Test2_projectionMapper(Test2_projectionCreator<T> creator, Factory<T1> test2ModelFactory) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
}
Expand Down
Expand Up @@ -74,7 +74,7 @@ interface Table_columns_selectCreator<T extends Table_columns_selectModel> {
final class Table_columns_selectMapper<T extends Table_columns_selectModel> implements RowMapper<T> {
private final Table_columns_selectCreator<T> creator;

Table_columns_selectMapper(Table_columns_selectCreator<T> creator) {
public Table_columns_selectMapper(Table_columns_selectCreator<T> creator) {
this.creator = creator;
}

Expand Down Expand Up @@ -102,7 +102,7 @@ interface View_columns_selectCreator<T extends View_columns_selectModel> {
final class View_columns_selectMapper<T extends View_columns_selectModel> implements RowMapper<T> {
private final View_columns_selectCreator<T> creator;

View_columns_selectMapper(View_columns_selectCreator<T> creator) {
public View_columns_selectMapper(View_columns_selectCreator<T> creator) {
this.creator = creator;
}

Expand Down Expand Up @@ -130,7 +130,7 @@ interface Column_view_column_selectCreator<T extends Column_view_column_selectMo
final class Column_view_column_selectMapper<T extends Column_view_column_selectModel> implements RowMapper<T> {
private final Column_view_column_selectCreator<T> creator;

Column_view_column_selectMapper(Column_view_column_selectCreator<T> creator) {
public Column_view_column_selectMapper(Column_view_column_selectCreator<T> creator) {
this.creator = creator;
}

Expand Down Expand Up @@ -169,7 +169,7 @@ final class View1Mapper<T1 extends TestModel, T extends View1Model<T1>> implemen

private final Factory<T1> testModelFactory;

View1Mapper(View1Creator<T1, T> creator, Factory<T1> testModelFactory) {
public View1Mapper(View1Creator<T1, T> creator, Factory<T1> testModelFactory) {
this.creator = creator;
this.testModelFactory = testModelFactory;
}
Expand All @@ -189,7 +189,7 @@ public T map(@NonNull Cursor cursor) {
final class View2Mapper<T extends View2Model> implements RowMapper<T> {
private final View2Creator<T> creator;

View2Mapper(View2Creator<T> creator) {
public View2Mapper(View2Creator<T> creator) {
this.creator = creator;
}

Expand Down
Expand Up @@ -55,7 +55,7 @@ final class Join_tablesMapper<T1 extends Test1Model, T2 extends Test2Model, T ex

private final Test2Model.Factory<T2> test2ModelFactory;

Join_tablesMapper(Join_tablesCreator<T1, T2, T> creator, Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
public Join_tablesMapper(Join_tablesCreator<T1, T2, T> creator, Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
this.test2ModelFactory = test2ModelFactory;
Expand Down
Expand Up @@ -47,7 +47,7 @@ final class Join_tablesMapper<T1 extends Test2Model, T2 extends Test1Model, T ex

private final Test1Model.Factory<T2> test1ModelFactory;

Join_tablesMapper(Join_tablesCreator<T1, T2, T> creator, Factory<T1> test2ModelFactory, Test1Model.Factory<T2> test1ModelFactory) {
public Join_tablesMapper(Join_tablesCreator<T1, T2, T> creator, Factory<T1> test2ModelFactory, Test1Model.Factory<T2> test1ModelFactory) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
this.test1ModelFactory = test1ModelFactory;
Expand Down
Expand Up @@ -65,7 +65,7 @@ final class Join_tablesMapper<T1 extends Test1Model, T2 extends Test2Model, T ex

private final Test2Model.Factory<T2> test2ModelFactory;

Join_tablesMapper(Join_tablesCreator<T1, T2, T> creator, Test1Model.Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
public Join_tablesMapper(Join_tablesCreator<T1, T2, T> creator, Test1Model.Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
this.test2ModelFactory = test2ModelFactory;
Expand Down Expand Up @@ -107,7 +107,7 @@ final class Tables_and_valueMapper<T1 extends Test1Model, T3 extends Test2Model,

private final Test2Model.Factory<T3> test2ModelFactory;

Tables_and_valueMapper(Tables_and_valueCreator<T1, T3, T> creator, Test1Model.Factory<T1> test1ModelFactory, Test2Model.Factory<T3> test2ModelFactory) {
public Tables_and_valueMapper(Tables_and_valueCreator<T1, T3, T> creator, Test1Model.Factory<T1> test1ModelFactory, Test2Model.Factory<T3> test2ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
this.test2ModelFactory = test2ModelFactory;
Expand Down Expand Up @@ -151,7 +151,7 @@ final class Custom_valueMapper<T1 extends Test2Model, T2 extends Test1Model, T e

private final Test1Model.Factory<T2> test1ModelFactory;

Custom_valueMapper(Custom_valueCreator<T1, T2, T> creator, Test2Model.Factory<T1> test2ModelFactory, Test1Model.Factory<T2> test1ModelFactory) {
public Custom_valueMapper(Custom_valueCreator<T1, T2, T> creator, Test2Model.Factory<T1> test2ModelFactory, Test1Model.Factory<T2> test1ModelFactory) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
this.test1ModelFactory = test1ModelFactory;
Expand Down Expand Up @@ -195,7 +195,7 @@ final class Aliased_custom_valueMapper<T1 extends Test2Model, T2 extends Test1Mo

private final Test1Model.Factory<T2> test1ModelFactory;

Aliased_custom_valueMapper(Aliased_custom_valueCreator<T1, T2, T> creator, Test2Model.Factory<T1> test2ModelFactory, Test1Model.Factory<T2> test1ModelFactory) {
public Aliased_custom_valueMapper(Aliased_custom_valueCreator<T1, T2, T> creator, Test2Model.Factory<T1> test2ModelFactory, Test1Model.Factory<T2> test1ModelFactory) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
this.test1ModelFactory = test1ModelFactory;
Expand Down Expand Up @@ -239,7 +239,7 @@ final class Aliased_tablesMapper<T1 extends Test1Model, T3 extends Test2Model, T

private final Test2Model.Factory<T3> test2ModelFactory;

Aliased_tablesMapper(Aliased_tablesCreator<T1, T3, T> creator, Test1Model.Factory<T1> test1ModelFactory, Test2Model.Factory<T3> test2ModelFactory) {
public Aliased_tablesMapper(Aliased_tablesCreator<T1, T3, T> creator, Test1Model.Factory<T1> test1ModelFactory, Test2Model.Factory<T3> test2ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
this.test2ModelFactory = test2ModelFactory;
Expand Down
Expand Up @@ -72,7 +72,7 @@ final class Join_tableMapper<T1 extends Test1Model, T2 extends Test2Model, T ext

private final Test2Model.Factory<T2> test2ModelFactory;

Join_tableMapper(Join_tableCreator<T1, T2, T> creator, Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
public Join_tableMapper(Join_tableCreator<T1, T2, T> creator, Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
this.test2ModelFactory = test2ModelFactory;
Expand Down Expand Up @@ -116,7 +116,7 @@ final class Left_join_tableMapper<T1 extends Test1Model, T2 extends Test2Model,

private final Test2Model.Factory<T2> test2ModelFactory;

Left_join_tableMapper(Left_join_tableCreator<T1, T2, T> creator, Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
public Left_join_tableMapper(Left_join_tableCreator<T1, T2, T> creator, Factory<T1> test1ModelFactory, Test2Model.Factory<T2> test2ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
this.test2ModelFactory = test2ModelFactory;
Expand Down Expand Up @@ -164,7 +164,7 @@ final class Join_table_columnsMapper<T1 extends Test1Model, T extends Join_table

private final Factory<T1> test1ModelFactory;

Join_table_columnsMapper(Join_table_columnsCreator<T1, T> creator, Factory<T1> test1ModelFactory) {
public Join_table_columnsMapper(Join_table_columnsCreator<T1, T> creator, Factory<T1> test1ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
}
Expand Down Expand Up @@ -208,7 +208,7 @@ final class Left_join_table_columnsMapper<T1 extends Test1Model, T extends Left_

private final Factory<T1> test1ModelFactory;

Left_join_table_columnsMapper(Left_join_table_columnsCreator<T1, T> creator, Factory<T1> test1ModelFactory) {
public Left_join_table_columnsMapper(Left_join_table_columnsCreator<T1, T> creator, Factory<T1> test1ModelFactory) {
this.creator = creator;
this.test1ModelFactory = test1ModelFactory;
}
Expand Down
Expand Up @@ -81,7 +81,7 @@ final class Join_viewMapper<T1 extends Test2Model, V2 extends View1Model, T exte

private final View1Creator<V2> view1Creator;

Join_viewMapper(Join_viewCreator<T1, V2, T> creator, Factory<T1> test2ModelFactory, View1Creator<V2> view1Creator) {
public Join_viewMapper(Join_viewCreator<T1, V2, T> creator, Factory<T1> test2ModelFactory, View1Creator<V2> view1Creator) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
this.view1Creator = view1Creator;
Expand Down Expand Up @@ -124,7 +124,7 @@ final class Join_view_columnsMapper<T1 extends Test2Model, T extends Join_view_c

private final Factory<T1> test2ModelFactory;

Join_view_columnsMapper(Join_view_columnsCreator<T1, T> creator, Factory<T1> test2ModelFactory) {
public Join_view_columnsMapper(Join_view_columnsCreator<T1, T> creator, Factory<T1> test2ModelFactory) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
}
Expand Down Expand Up @@ -164,7 +164,7 @@ final class Left_join_viewMapper<T1 extends Test2Model, V2 extends View1Model, T

private final View1Creator<V2> view1Creator;

Left_join_viewMapper(Left_join_viewCreator<T1, V2, T> creator, Factory<T1> test2ModelFactory, View1Creator<V2> view1Creator) {
public Left_join_viewMapper(Left_join_viewCreator<T1, V2, T> creator, Factory<T1> test2ModelFactory, View1Creator<V2> view1Creator) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
this.view1Creator = view1Creator;
Expand Down Expand Up @@ -209,7 +209,7 @@ final class Left_join_view_columnsMapper<T1 extends Test2Model, T extends Left_j

private final Factory<T1> test2ModelFactory;

Left_join_view_columnsMapper(Left_join_view_columnsCreator<T1, T> creator, Factory<T1> test2ModelFactory) {
public Left_join_view_columnsMapper(Left_join_view_columnsCreator<T1, T> creator, Factory<T1> test2ModelFactory) {
this.creator = creator;
this.test2ModelFactory = test2ModelFactory;
}
Expand Down