diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-10 10:21:52 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-10 10:21:52 +0200 |
commit | 30fe316402288ea19a86340d4c869351ce7aa1b1 (patch) | |
tree | a60699c7800d906c81c4ca8e13f9e9e057f9ea2b /container-compiler-plugin/src/main/java | |
parent | 26b01b500065634eb3133dc354a0ba71b13bff56 (diff) | |
download | container-playground-30fe316402288ea19a86340d4c869351ce7aa1b1.tar.gz container-playground-30fe316402288ea19a86340d4c869351ce7aa1b1.tar.bz2 container-playground-30fe316402288ea19a86340d4c869351ce7aa1b1.tar.xz container-playground-30fe316402288ea19a86340d4c869351ce7aa1b1.zip |
o Making a bit more usable.
Diffstat (limited to 'container-compiler-plugin/src/main/java')
-rw-r--r-- | container-compiler-plugin/src/main/java/io/trygvis/container/compiler/EntityHandler.java | 4 | ||||
-rw-r--r-- | container-compiler-plugin/src/main/java/io/trygvis/container/compiler/model/ClassG.java | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/EntityHandler.java b/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/EntityHandler.java index 9bce51e..1dbc534 100644 --- a/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/EntityHandler.java +++ b/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/EntityHandler.java @@ -261,8 +261,8 @@ public class EntityHandler extends AbstractHandler { String desc = "new " + sqlEntityDescType + "(" + toJavaString(entityMirror.tableName) + ", " + toJavaString(entityMirror.defaultFields()) + ", " + - toJavaString(createTableSql.name) + ", " + - toJavaString(dropTableSql.name) + + createTableSql.name + ", " + + dropTableSql.name + ")"; g.addPublicStaticFinalField(sqlEntityDescType, "desc").value(desc); ClassG.InnerClassG typedQuery = g.addInnerClass(entityMirror.queryType(g.imports)); diff --git a/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/model/ClassG.java b/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/model/ClassG.java index 402498c..3aa9c62 100644 --- a/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/model/ClassG.java +++ b/container-compiler-plugin/src/main/java/io/trygvis/container/compiler/model/ClassG.java @@ -6,6 +6,7 @@ import javax.annotation.Generated; import javax.lang.model.type.TypeMirror; import java.lang.reflect.Modifier; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.TreeSet; @@ -22,7 +23,8 @@ public class ClassG { private TypeRef extendsType; private List<TypeRef> implementsTypes = new ArrayList<>(); public final Imports imports = new Imports(); - private final Set<FieldRef> fields = new TreeSet<>(); + // Field order is important + private final Set<FieldRef> fields = new LinkedHashSet<>(); private final List<MethodRef> methods = new ArrayList<>(); private final List<Constructor> constructors = new ArrayList<>(); private final List<InnerClassG> innerClasses = new ArrayList<>(); |