use of com.tvd12.calabash.persist.action.PersistSaveOneAction in project calabash by youngmonkeys.
the class SimpleEntityMapPersistExecutor method persist.
@Override
public void persist(EntityMapSetting mapSetting, Object key, Object value) {
EntityMapPersist mapPersist = getMapPersist(mapSetting);
if (mapPersist != null) {
PersistSaveOneAction action = new PersistSaveOneAction(key, value);
addPersistActionToQueue(mapSetting, action);
}
}
use of com.tvd12.calabash.persist.action.PersistSaveOneAction 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.PersistSaveOneAction 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.PersistSaveOneAction in project calabash by youngmonkeys.
the class SimpleBytesMapPersistExecutor method persist.
@Override
public void persist(MapSetting mapSetting, ByteArray key, byte[] value) {
BytesMapPersist mapPersist = getMapPersist(mapSetting);
if (mapPersist != null) {
PersistSaveOneAction action = new PersistSaveOneAction(key, value);
addPersistActionToQueue(mapSetting, action);
}
}
Aggregations