类 Example

    • 字段详细资料

      • orderByClause

        protected String orderByClause
      • distinct

        protected boolean distinct
      • exists

        protected boolean exists
      • notNull

        protected boolean notNull
      • forUpdate

        protected boolean forUpdate
      • selectColumns

        protected Set<String> selectColumns
      • excludeColumns

        protected Set<String> excludeColumns
      • countColumn

        protected String countColumn
      • entityClass

        protected Class<?> entityClass
      • tableName

        protected String tableName
    • 构造器详细资料

      • Example

        public Example​(Class<?> entityClass)
        默认exists为true
        参数:
        entityClass -
      • Example

        public Example​(Class<?> entityClass,
                       boolean exists)
        带exists参数的构造方法,默认notNull为false,允许为空
        参数:
        entityClass -
        exists - - true时,如果字段不存在就抛出异常,false时,如果不存在就不使用该字段的条件
      • Example

        public Example​(Class<?> entityClass,
                       boolean exists,
                       boolean notNull)
        带exists参数的构造方法
        参数:
        entityClass -
        exists - - true时,如果字段不存在就抛出异常,false时,如果不存在就不使用该字段的条件
        notNull - - true时,如果值为空,就会抛出异常,false时,如果为空就不使用该字段的条件
    • 方法详细资料

      • excludeProperties

        public Example excludeProperties​(String... properties)
        排除查询字段,优先级低于 selectProperties
        参数:
        properties - 属性名的可变参数
        返回:
      • selectProperties

        public Example selectProperties​(String... properties)
        指定要查询的属性列 - 这里会自动映射到表字段
        参数:
        properties -
        返回:
      • clear

        public void clear()
      • getCountColumn

        public String getCountColumn()
      • getEntityClass

        public Class<?> getEntityClass()
      • getOrderByClause

        public String getOrderByClause()
      • setOrderByClause

        public void setOrderByClause​(String orderByClause)
      • getSelectColumns

        public Set<String> getSelectColumns()
      • isDistinct

        public boolean isDistinct()
      • setDistinct

        public void setDistinct​(boolean distinct)
      • isForUpdate

        public boolean isForUpdate()
      • setForUpdate

        public void setForUpdate​(boolean forUpdate)
      • setCountProperty

        public void setCountProperty​(String property)
        指定 count(property) 查询属性
        参数:
        property -
      • setTableName

        public void setTableName​(String tableName)
        设置表名
        参数:
        tableName -