예제 #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;
  }
예제 #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;
  }
예제 #3
0
  /** @param 对type进行赋值 */
  public void setType(Class<T> type) {
    AssertUtils.notNull(type, "type is empty.");

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