|
31 | 31 | import io.supertokens.pluginInterface.RowMapper;
|
32 | 32 | import io.supertokens.pluginInterface.bulkimport.BulkImportStorage.BulkImportUserStatus;
|
33 | 33 | import io.supertokens.pluginInterface.bulkimport.BulkImportUser;
|
34 |
| -import io.supertokens.pluginInterface.bulkimport.BulkImportUserInfo; |
35 | 34 | import io.supertokens.pluginInterface.exceptions.StorageQueryException;
|
36 | 35 | import io.supertokens.pluginInterface.multitenancy.AppIdentifier;
|
37 | 36 | import io.supertokens.storage.postgresql.Start;
|
@@ -126,7 +125,7 @@ public static void updateBulkImportUserStatus_Transaction(Start start, Connectio
|
126 | 125 | });
|
127 | 126 | }
|
128 | 127 |
|
129 |
| - public static List<BulkImportUserInfo> getBulkImportUsers(Start start, AppIdentifier appIdentifier, @Nonnull Integer limit, @Nullable BulkImportUserStatus status, |
| 128 | + public static List<BulkImportUser> getBulkImportUsers(Start start, AppIdentifier appIdentifier, @Nonnull Integer limit, @Nullable BulkImportUserStatus status, |
130 | 129 | @Nullable String bulkImportUserId, @Nullable Long createdAt)
|
131 | 130 | throws SQLException, StorageQueryException {
|
132 | 131 |
|
@@ -161,27 +160,27 @@ public static List<BulkImportUserInfo> getBulkImportUsers(Start start, AppIdenti
|
161 | 160 | pst.setObject(i + 1, parameters.get(i));
|
162 | 161 | }
|
163 | 162 | }, result -> {
|
164 |
| - List<BulkImportUserInfo> bulkImportUsers = new ArrayList<>(); |
| 163 | + List<BulkImportUser> bulkImportUsers = new ArrayList<>(); |
165 | 164 | while (result.next()) {
|
166 |
| - bulkImportUsers.add(BulkImportUserInfoRowMapper.getInstance().mapOrThrow(result)); |
| 165 | + bulkImportUsers.add(BulkImportUserRowMapper.getInstance().mapOrThrow(result)); |
167 | 166 | }
|
168 | 167 | return bulkImportUsers;
|
169 | 168 | });
|
170 | 169 | }
|
171 | 170 |
|
172 |
| - private static class BulkImportUserInfoRowMapper implements RowMapper<BulkImportUserInfo, ResultSet> { |
173 |
| - private static final BulkImportUserInfoRowMapper INSTANCE = new BulkImportUserInfoRowMapper(); |
| 171 | + private static class BulkImportUserRowMapper implements RowMapper<BulkImportUser, ResultSet> { |
| 172 | + private static final BulkImportUserRowMapper INSTANCE = new BulkImportUserRowMapper(); |
174 | 173 |
|
175 |
| - private BulkImportUserInfoRowMapper() { |
| 174 | + private BulkImportUserRowMapper() { |
176 | 175 | }
|
177 | 176 |
|
178 |
| - private static BulkImportUserInfoRowMapper getInstance() { |
| 177 | + private static BulkImportUserRowMapper getInstance() { |
179 | 178 | return INSTANCE;
|
180 | 179 | }
|
181 | 180 |
|
182 | 181 | @Override
|
183 |
| - public BulkImportUserInfo map(ResultSet result) throws Exception { |
184 |
| - return new BulkImportUserInfo(result.getString("id"), result.getString("raw_data"), |
| 182 | + public BulkImportUser map(ResultSet result) throws Exception { |
| 183 | + return BulkImportUser.fromDBJson(result.getString("id"), result.getString("raw_data"), |
185 | 184 | BulkImportUserStatus.valueOf(result.getString("status")),
|
186 | 185 | result.getLong("created_at"), result.getLong("updated_at"));
|
187 | 186 | }
|
|
0 commit comments