Exemplo n.º 1
0
 static {
   JAVA_TO_SQLITE_TYPE = new HashMap<>();
   JAVA_TO_SQLITE_TYPE.put(TypeName.INT.toString(), INTEGER);
   JAVA_TO_SQLITE_TYPE.put(TypeName.LONG.toString(), INTEGER);
   JAVA_TO_SQLITE_TYPE.put(TypeName.FLOAT.toString(), REAL);
   JAVA_TO_SQLITE_TYPE.put(TypeName.DOUBLE.toString(), REAL);
   JAVA_TO_SQLITE_TYPE.put(TypeName.BOOLEAN.toString(), INTEGER);
   JAVA_TO_SQLITE_TYPE.put(ClassName.get(String.class).toString(), TEXT);
   JAVA_TO_SQLITE_TYPE.put(BYTE_ARRAY, BLOB);
 }
Exemplo n.º 2
0
 static {
   CURSOR_TO_JAVA_TYPE = new HashMap<>();
   CURSOR_TO_JAVA_TYPE.put(TypeName.INT.toString(), "$T.getInt(cursor, $S)");
   CURSOR_TO_JAVA_TYPE.put(TypeName.LONG.toString(), "$T.getLong(cursor, $S)");
   CURSOR_TO_JAVA_TYPE.put(TypeName.FLOAT.toString(), "$T.getFloat(cursor, $S)");
   CURSOR_TO_JAVA_TYPE.put(TypeName.DOUBLE.toString(), "$T.getDouble(cursor, $S)");
   CURSOR_TO_JAVA_TYPE.put(TypeName.BOOLEAN.toString(), "$T.getBoolean(cursor, $S)");
   CURSOR_TO_JAVA_TYPE.put(ClassName.get(String.class).toString(), "$T.getString(cursor, $S)");
   CURSOR_TO_JAVA_TYPE.put(BYTE_ARRAY, "$T.getBlob(cursor, $S)");
 }