Example #1
0
    @SuppressWarnings({"unchecked", "rawtypes"})
    @Override
    public void processResultRow(Row row, EntityManagerImpl em, ArrayList<?> list) {
      Object[] result = new Object[selections.length];

      for (int i = 0; i < selections.length; i++) {
        String stringValue = row.getColumnValue(aliases.get(selections[i]));

        if (selections[i] instanceof PathImpl) {
          PathImpl<?> path = (PathImpl<?>) selections[i];
          EntityConfiguration config =
              path.root.configuration.getConfigurationForEntity(path.root.entityClass);

          SQLiteTypeManager sqlMng =
              SQLiteTypeManagerManager.get(config.getFieldConfiguration(path.path).fieldClass);

          result[i] = sqlMng.getValueFromString(stringValue);
        }
      }

      ((List) list).add(result);
    }