Package org.nutz.lang.segment

Examples of org.nutz.lang.segment.CharSegment


  public static Condition wrap(String str) {
    return new SimpleCondition((Object) str);
  }

  public static Condition wrap(String sql, Object value) {
    return new SimpleCondition(new CharSegment(sql).setBy(value));
  }
View Full Code Here


import org.nutz.lang.segment.CharSegment;

public abstract class EntityName {

  public static EntityName create(String s) {
    CharSegment seg = new CharSegment(s);
    if (seg.keys().size() > 0)
      return new DynamicEntityName(seg);
    return new StaticEntityName(s);
  }
View Full Code Here

        sts.add(Sqls.create(sql));
    return sts;
  }

  protected static String gSQL(String ptn, String table, String field) {
    CharSegment cs = new CharSegment(ptn);
    cs.set("T", table).set("F", field);
    return cs.toString();
  }
View Full Code Here

        ef.setAsCompositePk();
    }

    // 默认值
    if (null != info.annDefault)
      ef.setDefaultValue(new CharSegment(info.annDefault.value()));

    // 只读
    if (null != info.annReadonly)
      ef.setAsReadonly();
View Full Code Here

          }

          // 将本地化字符串增加到当前语言
          for (String key : p.keySet()) {
            String str = p.get(key);
            Segment seg = (new CharSegment()).valueOf(str);
            if (seg.keys().isEmpty())
              msgs.put(key, str);
            else
              msgs.put(key, seg);
          }
View Full Code Here

  private Map<String, El> exps;

  public AbstractPathView(String dest) {
    if (null != dest) {
      this.dest = new CharSegment(Strings.trim(dest));
      this.exps = new HashMap<String, El>();
      // 预先将每个占位符解析成表达式
      for (String key : this.dest.keys()) {
        this.exps.put(key, new El(key));
      }
View Full Code Here

                sts.add(Sqls.create(sql));
        return sts;
    }

    protected static String gSQL(String ptn, String table, String field) {
        CharSegment cs = new CharSegment(ptn);
        cs.set("T", table).set("F", field);
        return cs.toString();
    }
View Full Code Here

                ef.setAsCompositePk();
        }

        // 默认值
        if (null != info.annDefault)
            ef.setDefaultValue(new CharSegment(info.annDefault.value()));

        // 只读
        if (null != info.annReadonly)
            ef.setAsReadonly();
View Full Code Here

    public static Condition wrap(String str) {
        return Strings.isBlank(str) ? null : new SimpleCondition((Object) str);
    }

    public static Condition wrap(String sql, Object value) {
        return Strings.isBlank(sql) ? null : new SimpleCondition(new CharSegment(sql).setBy(value));
    }
View Full Code Here

    private Map<String, El> exps;

    public AbstractPathView(String dest) {
        if (null != dest) {
            this.dest = new CharSegment(Strings.trim(dest));
            this.exps = new HashMap<String, El>();
            // 预先将每个占位符解析成表达式
            for (String key : this.dest.keys()) {
                this.exps.put(key, new El(key));
            }
View Full Code Here

TOP

Related Classes of org.nutz.lang.segment.CharSegment

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.