summaryrefslogtreecommitdiff
path: root/container-compiler-plugin/src/main/java/io/trygvis/persistence/GeneratorConfiguration.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-compiler-plugin/src/main/java/io/trygvis/persistence/GeneratorConfiguration.java')
-rw-r--r--container-compiler-plugin/src/main/java/io/trygvis/persistence/GeneratorConfiguration.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/container-compiler-plugin/src/main/java/io/trygvis/persistence/GeneratorConfiguration.java b/container-compiler-plugin/src/main/java/io/trygvis/persistence/GeneratorConfiguration.java
index 9df6c35..48072de 100644
--- a/container-compiler-plugin/src/main/java/io/trygvis/persistence/GeneratorConfiguration.java
+++ b/container-compiler-plugin/src/main/java/io/trygvis/persistence/GeneratorConfiguration.java
@@ -3,6 +3,7 @@ package io.trygvis.persistence;
import io.trygvis.container.compiler.CompilerException;
import io.trygvis.container.compiler.model.TypeRef;
+import java.sql.Types;
import java.util.Date;
import java.util.Map;
import java.util.TreeMap;
@@ -13,8 +14,10 @@ public class GeneratorConfiguration {
private final Map<TypeRef, TypeHandler> typeHandlers = new TreeMap<>();
{
- typeHandlers.put(new TypeRef(Integer.class), new TypeHandler.IntTypeHandler());
- typeHandlers.put(new TypeRef(Long.class), new TypeHandler.LongTypeHandler());
+ typeHandlers.put(new TypeRef(int.class), new TypeHandler.PrimitiveTypeHandler("INTEGER", Types.INTEGER, "Int", false));
+ typeHandlers.put(new TypeRef(Integer.class), new TypeHandler.PrimitiveTypeHandler("INTEGER", Types.INTEGER, "Int", true));
+ typeHandlers.put(new TypeRef(long.class), new TypeHandler.PrimitiveTypeHandler("BIGINT", Types.BIGINT, "Long", false));
+ typeHandlers.put(new TypeRef(Long.class), new TypeHandler.PrimitiveTypeHandler("BIGINT", Types.BIGINT, "Long", true));
typeHandlers.put(new TypeRef(String.class), new TypeHandler.StringTypeHandler());
typeHandlers.put(new TypeRef(Date.class), new TypeHandler.DateTypeHandler());
typeHandlers.put(new TypeRef("org.joda.time.DateTime"), new TypeHandler.JodaDateTimeTypeHandler());