if (link != null) {
for (String name : req.queryParams()) {
if (name.startsWith("_")) {
continue;
}
LinkOption option = ORMManager.get(LinkOption.class)
.getFirstAnd("link_id", "=", link, "name", "=",
name);
String value = req.queryParams(name);
if (value != null && value.length() > 0) {
if (option == null) {
option = new LinkOption();
option.setLink(link);
option.setOption(name);
}
option.setValue(value);
ORMManager.get(LinkOption.class).saveOrUpdate(
option);
} else {
if (option != null) {
ORMManager.get(LinkOption.class).delete(option);