use of com.tvd12.calabash.persist.action.PersistSaveManyAction in project calabash by youngmonkeys.
the class PersistSaveActionBulk method execute.
@Override
public void execute() {
Map<Object, Object> keyValues = new HashMap<>();
for (PersistAction action : actions) {
if (action.getType() == PersistActionType.SAVE_ONE) {
PersistSaveOneAction one = (PersistSaveOneAction) action;
keyValues.put(one.getKey(), one.getValue());
} else {
PersistSaveManyAction many = (PersistSaveManyAction) action;
keyValues.putAll(many.getKeyValues());
}
}
((EntityMapPersist) mapPersist).persist(keyValues);
}
use of com.tvd12.calabash.persist.action.PersistSaveManyAction in project calabash by youngmonkeys.
the class PersistSaveActionBulk method execute.
@Override
public void execute() {
Map keyValues = new HashMap<>();
for (PersistAction action : actions) {
if (action.getType() == PersistActionType.SAVE_ONE) {
PersistSaveOneAction one = (PersistSaveOneAction) action;
keyValues.put(one.getKey(), one.getValue());
} else {
PersistSaveManyAction many = (PersistSaveManyAction) action;
keyValues.putAll(many.getKeyValues());
}
}
((BytesMapPersist) mapPersist).persist(keyValues);
}
use of com.tvd12.calabash.persist.action.PersistSaveManyAction in project calabash by youngmonkeys.
the class SimpleBytesMapPersistExecutor method persist.
@Override
public void persist(MapSetting mapSetting, Map<ByteArray, byte[]> m) {
BytesMapPersist mapPersist = getMapPersist(mapSetting);
if (mapPersist != null) {
PersistSaveManyAction action = new PersistSaveManyAction(m);
addPersistActionToQueue(mapSetting, action);
}
}
use of com.tvd12.calabash.persist.action.PersistSaveManyAction in project calabash by youngmonkeys.
the class SimpleEntityMapPersistExecutor method persist.
@Override
public void persist(EntityMapSetting mapSetting, Map m) {
EntityMapPersist mapPersist = getMapPersist(mapSetting);
if (mapPersist != null) {
PersistSaveManyAction action = new PersistSaveManyAction(m);
addPersistActionToQueue(mapSetting, action);
}
}
Aggregations