Package jnode.dto

Examples of jnode.dto.LinkOption


        List<LinkOption_1_1> options2 = ORMManager.get(
            LinkOption_1_1.class).getAll();

        ArrayList<LinkOption> options = new ArrayList<>();
        for (LinkOption_1_1 l2 : options2) {
          LinkOption l = new LinkOption();
          l.setLink(l2.getLink());
          l.setOption(l2.getOption());
          l.setValue(l2.getValue());
          options.add(l);
        }
        TableUtils.dropTable(ORMManager.getSource(),
            LinkOption_1_1.class, true);
        TableUtils
View Full Code Here


   * @return
   */
  public static String getOption(Link link, String option) {
    String value = "";
    if (link.getId() != null) {
      LinkOption opt = ORMManager.get(LinkOption.class).getFirstAnd(
          "link_id", "=", link, "name", "=", option.toLowerCase());
      if (opt != null) {
        value = opt.getValue();
      }
    }
    return value;
  }
View Full Code Here

    }

  }

  public static void setOption(Link link, String name, String value) {
    LinkOption option = ORMManager.get(LinkOption.class).getFirstAnd(
        "link_id", "=", link, "name", "=", name);
    if (option == null) {
      option = new LinkOption(link, name, value);
    } else {
      option.setValue(value);
    }
    ORMManager.get(LinkOption.class).saveOrUpdate(option);
  }
View Full Code Here

        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);
View Full Code Here

TOP

Related Classes of jnode.dto.LinkOption

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.