private void save(PropertiesMapper mapper, String key, @Nullable Integer userId, @Nullable Long componentId, @Nullable String value) { checkKey(key); long now = system2.now(); mapper.delete(key, userId, componentId); if (isEmpty(value)) { mapper.insertAsEmpty(key, userId, componentId, now); } else if (mustBeStoredInClob(value)) { mapper.insertAsClob(key, userId, componentId, value, now); } else { mapper.insertAsText(key, userId, componentId, value, now); } }
public int delete(DbSession dbSession, PropertyDto dto) { return getMapper(dbSession).delete(dto.getKey(), dto.getUserId(), dto.getResourceId()); }
private void save(PropertiesMapper mapper, String key, @Nullable Long userId, @Nullable Long componentId, @Nullable String value) { checkKey(key); long now = system2.now(); mapper.delete(key, userId, componentId); if (isEmpty(value)) { mapper.insertAsEmpty(key, userId, componentId, now); } else if (mustBeStoredInClob(value)) { mapper.insertAsClob(key, userId, componentId, value, now); } else { mapper.insertAsText(key, userId, componentId, value, now); } }
public int delete(DbSession dbSession, PropertyDto dto) { return getMapper(dbSession).delete(dto.getKey(), dto.getUserId(), dto.getResourceId()); }