|
29 | 29 | import javax.annotation.Nullable;
|
30 | 30 |
|
31 | 31 | import io.supertokens.pluginInterface.RowMapper;
|
32 |
| -import io.supertokens.pluginInterface.bulkimport.BulkImportStorage.BulkImportUserStatus; |
| 32 | +import io.supertokens.pluginInterface.bulkimport.BulkImportStorage.BULK_IMPORT_USER_STATUS; |
33 | 33 | import io.supertokens.pluginInterface.bulkimport.BulkImportUser;
|
34 | 34 | import io.supertokens.pluginInterface.exceptions.StorageQueryException;
|
35 | 35 | import io.supertokens.pluginInterface.multitenancy.AppIdentifier;
|
@@ -87,12 +87,12 @@ public static void insertBulkImportUsers(Start start, AppIdentifier appIdentifie
|
87 | 87 | for (BulkImportUser user : users) {
|
88 | 88 | pst.setString(parameterIndex++, user.id);
|
89 | 89 | pst.setString(parameterIndex++, appIdentifier.getAppId());
|
90 |
| - pst.setString(parameterIndex++, user.toString()); |
| 90 | + pst.setString(parameterIndex++, user.toRawDataForDbStorage()); |
91 | 91 | }
|
92 | 92 | });
|
93 | 93 | }
|
94 | 94 |
|
95 |
| - public static void updateBulkImportUserStatus_Transaction(Start start, Connection con, AppIdentifier appIdentifier, @Nonnull String[] bulkImportUserIds, @Nonnull BulkImportUserStatus status) |
| 95 | + public static void updateBulkImportUserStatus_Transaction(Start start, Connection con, AppIdentifier appIdentifier, @Nonnull String[] bulkImportUserIds, @Nonnull BULK_IMPORT_USER_STATUS status) |
96 | 96 | throws SQLException, StorageQueryException {
|
97 | 97 | if (bulkImportUserIds.length == 0) {
|
98 | 98 | return;
|
@@ -125,7 +125,7 @@ public static void updateBulkImportUserStatus_Transaction(Start start, Connectio
|
125 | 125 | });
|
126 | 126 | }
|
127 | 127 |
|
128 |
| - public static List<BulkImportUser> 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 BULK_IMPORT_USER_STATUS status, |
129 | 129 | @Nullable String bulkImportUserId, @Nullable Long createdAt)
|
130 | 130 | throws SQLException, StorageQueryException {
|
131 | 131 |
|
@@ -180,8 +180,8 @@ private static BulkImportUserRowMapper getInstance() {
|
180 | 180 |
|
181 | 181 | @Override
|
182 | 182 | public BulkImportUser map(ResultSet result) throws Exception {
|
183 |
| - return BulkImportUser.fromDBJson(result.getString("id"), result.getString("raw_data"), |
184 |
| - BulkImportUserStatus.valueOf(result.getString("status")), |
| 183 | + return BulkImportUser.fromRawDataFromDbStorage(result.getString("id"), result.getString("raw_data"), |
| 184 | + BULK_IMPORT_USER_STATUS.valueOf(result.getString("status")), |
185 | 185 | result.getLong("created_at"), result.getLong("updated_at"));
|
186 | 186 | }
|
187 | 187 | }
|
|
0 commit comments