blob: fc20b66e3b60bd0560781db1605cd89c478feb43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package org.openecomp.core.tools.commands;
import com.datastax.driver.core.ResultSet;
import org.openecomp.core.tools.store.HealingHandler;
import org.openecomp.core.tools.store.VersionCassandraLoader;
import org.openecomp.core.tools.store.zusammen.datatypes.HealingEntity;
import java.util.ArrayList;
/**
* Created by ayalaben on 10/15/2017
*/
public class SetHealingFlag {
private SetHealingFlag(){}
public static void populateHealingTable(String oldVersion) {
VersionCassandraLoader versionCassandraLoader = new VersionCassandraLoader();
ResultSet listItemVersion = versionCassandraLoader.listItemVersion();
ArrayList<HealingEntity> healingEntities = new ArrayList<>();
listItemVersion.iterator().forEachRemaining(entry -> healingEntities.add(new HealingEntity
(entry.getString(0),entry.getString(1),entry.getString(2),true,oldVersion)));
HealingHandler healingHandler = new HealingHandler();
healingHandler.populateHealingTable(healingEntities);
}
}
|