Ejemplo n.º 1
0
  /** <默认构造函数> */
  public SqlSource(Class<T> type, Dialect dialect) {
    super();

    AssertUtils.notNull(type, "type is empty.");
    AssertUtils.notNull(dialect, "dialect is empty.");

    this.type = type;
    this.classReflector = ClassReflector.forClass(type);
    this.dialect = dialect;
  }
Ejemplo n.º 2
0
  /** <默认构造函数> */
  public SqlSource(Class<T> type, String tableName, String pkName, Dialect dialect) {
    super();

    AssertUtils.notNull(type, "type is empty.");
    AssertUtils.notEmpty(pkName, "pkName is empty.");
    AssertUtils.notEmpty(tableName, "tableName is empty.");
    AssertUtils.notNull(dialect, "dialect is empty.");

    this.type = type;
    this.classReflector = ClassReflector.forClass(type);
    this.pkName = pkName.trim();
    this.tableName = tableName.trim().toUpperCase();
    this.dialect = dialect;
  }
Ejemplo n.º 3
0
  /** @param 对type进行赋值 */
  public void setType(Class<T> type) {
    AssertUtils.notNull(type, "type is empty.");

    this.type = type;
    this.classReflector = ClassReflector.forClass(type);
  }