Libraryless. Click here for Pure Java version (20163L/122K).
1 | svoid cMigrateField(Concept c, S oldField, S newField) { |
2 | if (c == null) ret; |
3 | O oldValue = cget(c, oldField); |
4 | O newValue = cget(c, newField); |
5 | if (oldValue != null && newValue == null) pcall { |
6 | S name = shortDynName(c); |
7 | print("Migrating " + name + "." + oldField + " -> " + name + "." + newField + " [id " + c.id + "]"); |
8 | cset(c, newField, oldValue); |
9 | cset(c, oldField, null); |
10 | } |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034366 |
Snippet name: | cMigrateField |
Eternal ID of this version: | #1034366/2 |
Text MD5: | d3b72c973b3879f8b039285bc85920b2 |
Transpilation MD5: | 27f78101c7b4cb618d604a24b6a909c7 |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-03 08:23:25 |
Source code size: | 411 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 142 / 208 |
Version history: | 1 change(s) |
Referenced in: | [show references] |