类 BaseService<T,​ID extends java.io.Serializable,​R extends SupportRepository<T,​ID>>

    • 构造器概要

      构造器 
      构造器 说明
      BaseService()
      已过时。
       
    • 方法概要

      所有方法 实例方法 具体方法 已过时的方法 
      修饰符和类型 方法 说明
      protected boolean checkDeleteable​(ID id)
      已过时。
       
      protected boolean checkDeleteable​(T entity)
      已过时。
       
      long count()
      已过时。
      Returns the number of entities available.
      long count​(org.springframework.data.jpa.domain.Specification<T> spec)
      已过时。
      Returns the number of instances that the given Specification will return.
      void delete​(ID id)
      已过时。
      Deletes the entity with the given id.
      void delete​(ID[] ids)
      已过时。
       
      void delete​(ID[] ids, boolean isPhysical)
      已过时。
       
      void delete​(ID id, boolean isPhysical)
      已过时。
      Deletes the entity with the given id.
      void delete​(java.lang.Iterable<? extends T> entities)
      已过时。
      Deletes the given entities.
      void delete​(java.lang.Iterable<? extends T> entities, boolean isPhysical)
      已过时。
      Deletes the given entities.
      void delete​(java.util.List<ID> ids)
      已过时。
       
      void delete​(java.util.List<ID> ids, boolean isPhysical)
      已过时。
       
      void delete​(T entity)
      已过时。
      Deletes a given entity.
      void delete​(T entity, boolean isPhysical)
      已过时。
      Deletes a given entity.
      void deleteAll()
      已过时。
      Deletes all entities managed by the repository.
      void deleteAll​(boolean isPhysical)
      已过时。
      Deletes all entities managed by the repository.
      boolean exists​(ID id)
      已过时。
      Returns whether an entity with the given id exists.
      java.lang.Iterable<T> findAll()
      已过时。
      Returns all instances of the type.
      java.lang.Iterable<T> findAll​(java.lang.Iterable<ID> ids)
      已过时。
      Returns all instances of the type with the given IDs.
      <S extends T>
      java.lang.Iterable<S>
      findAll​(org.springframework.data.domain.Example<S> example)
      已过时。
       
      <S extends T>
      org.springframework.data.domain.Page<S>
      findAll​(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable)
      已过时。
       
      java.util.List<T> findAll​(org.springframework.data.jpa.domain.Specification<T> spec)
      已过时。
      Returns all entities matching the given Specification.
      org.springframework.data.domain.Page<T> findAll​(org.springframework.data.jpa.domain.Specification<T> spec, org.springframework.data.domain.Pageable pageable)
      已过时。
      Returns a Page of entities matching the given Specification.
      java.util.List<T> findAll​(org.springframework.data.jpa.domain.Specification<T> spec, org.springframework.data.domain.Sort sort)
      已过时。
      Returns all entities matching the given Specification and Sort.
      java.util.List<T> findAll​(T entity)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,不带支持权限)
      java.util.List<T> findAll​(T entity, org.springframework.data.domain.ExampleMatcher matcher)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,不带支持权限)
      org.springframework.data.domain.Page<T> findAll​(T entity, org.springframework.data.domain.ExampleMatcher matcher, org.springframework.data.domain.Pageable pageable)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,不带支持权限)
      org.springframework.data.domain.Page<T> findAll​(T entity, org.springframework.data.domain.Pageable pageable)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,不带支持权限)
      java.util.List<T> findAllWithDataRule​(org.springframework.data.jpa.domain.Specification<T> specification)
      已过时。
      根据传入的查询条件拼接上数据范围条件后查询
      org.springframework.data.domain.Page<T> findAllWithDataRule​(org.springframework.data.jpa.domain.Specification<T> specification, org.springframework.data.domain.Pageable pageable)
      已过时。
      根据传入的查询条件拼接上数据范围条件后查询(分页)
      java.util.List<T> findAllWithDataRule​(T entity)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,支持权限)
      java.util.List<T> findAllWithDataRule​(T entity, org.springframework.data.domain.ExampleMatcher matcher)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,支持权限)
      org.springframework.data.domain.Page<T> findAllWithDataRule​(T entity, org.springframework.data.domain.ExampleMatcher matcher, org.springframework.data.domain.Pageable pageable)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,支持权限)
      org.springframework.data.domain.Page<T> findAllWithDataRule​(T entity, org.springframework.data.domain.Pageable pageable)
      已过时。
      解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,支持权限)
      T findOne​(ID id)
      已过时。
      Retrieves an entity by its id.
      T findOne​(org.springframework.data.jpa.domain.Specification<T> spec)
      已过时。
      Returns a single entity matching the given Specification.
      T getOne​(ID id)
      已过时。
      Returns a reference to the entity with the given identifier.
      org.springframework.data.jpa.domain.Specification<T> handleQueryAnnotation​(T entity)
      已过时。
      解析实体类上的Query*注解生成Specification
      org.springframework.data.jpa.domain.Specification<T> handleQueryAnnotation​(T entity, org.springframework.data.domain.ExampleMatcher matcher)
      已过时。
      解析实体类上的Query*注解生成Specification, 带过滤条件
      <S extends T>
      java.lang.Iterable<S>
      save​(java.lang.Iterable<S> entities)
      已过时。
      Saves all given entities.
      <S extends T>
      S
      save​(S entity)
      已过时。
      Saves a given entity.
      void setDataRuleWapper​(DataRuleWapper dataRuleWapper)
      已过时。
       
      <S extends R>
      void
      setRepository​(S repository)
      已过时。
       
      protected void tagDelete​(ID id)
      已过时。
       
      protected void tagDelete​(T entity)
      已过时。
       
      T update​(ID id, T entity)
      已过时。
      fetch an entity
      org.springframework.data.jpa.domain.Specification<T> withDataRule​(org.springframework.data.jpa.domain.Specification<T> specification)
      已过时。
      给传入的条件拼接数据范围条件
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • isReparable

        protected boolean isReparable
        已过时。
      • dataRuleWapper

        protected DataRuleWapper dataRuleWapper
        已过时。
    • 构造器详细资料

      • BaseService

        public BaseService()
        已过时。
    • 方法详细资料

      • setRepository

        @Autowired
        public <S extends R> void setRepository​(S repository)
        已过时。
      • setDataRuleWapper

        @Autowired(required=false)
        public void setDataRuleWapper​(DataRuleWapper dataRuleWapper)
        已过时。
      • save

        @Transactional
        public <S extends T> S save​(S entity)
        已过时。
        从接口复制的说明: CrudService
        Saves a given entity. Use the returned instance for further operations as the save operation might have changed the entity instance completely.
        指定者:
        save 在接口中 CrudService<T,​ID extends java.io.Serializable>
        类型参数:
        S - S
        参数:
        entity - Jpa Entity
        返回:
        the saved entity
      • save

        public <S extends T> java.lang.Iterable<S> save​(java.lang.Iterable<S> entities)
        已过时。
        从接口复制的说明: CrudService
        Saves all given entities.
        指定者:
        save 在接口中 CrudService<T,​ID extends java.io.Serializable>
        类型参数:
        S - S
        参数:
        entities - The entities
        返回:
        the saved entities
      • findOne

        public T findOne​(ID id)
        已过时。
        从接口复制的说明: CrudService
        Retrieves an entity by its id.
        指定者:
        findOne 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        id - must not be null.
        返回:
        the entity with the given id or null if none found
      • getOne

        public T getOne​(ID id)
        已过时。
        从接口复制的说明: CrudService
        Returns a reference to the entity with the given identifier.
        指定者:
        getOne 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        id - must not be null.
        返回:
        a reference to the entity with the given identifier.
        另请参阅:
        EntityManager.getReference(Class, Object)
      • exists

        public boolean exists​(ID id)
        已过时。
        从接口复制的说明: CrudService
        Returns whether an entity with the given id exists.
        指定者:
        exists 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        id - must not be null.
        返回:
        true if an entity with the given id exists, false otherwise
      • findAll

        public java.lang.Iterable<T> findAll()
        已过时。
        从接口复制的说明: CrudService
        Returns all instances of the type.
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        返回:
        all entities
      • findAll

        public java.lang.Iterable<T> findAll​(java.lang.Iterable<ID> ids)
        已过时。
        从接口复制的说明: CrudService
        Returns all instances of the type with the given IDs.
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        ids - ids
        返回:
        I
      • count

        public long count()
        已过时。
        从接口复制的说明: CrudService
        Returns the number of entities available.
        指定者:
        count 在接口中 CrudService<T,​ID extends java.io.Serializable>
        返回:
        the number of entities
      • delete

        public void delete​(ID id)
        已过时。
        从接口复制的说明: CrudService
        Deletes the entity with the given id.
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        id - must not be null.
      • delete

        public void delete​(java.util.List<ID> ids)
        已过时。
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
      • delete

        public void delete​(ID[] ids)
        已过时。
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
      • delete

        public void delete​(T entity)
        已过时。
        从接口复制的说明: CrudService
        Deletes a given entity.
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - The entity
      • delete

        public void delete​(java.lang.Iterable<? extends T> entities)
        已过时。
        从接口复制的说明: CrudService
        Deletes the given entities.
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entities - The entities
      • deleteAll

        public void deleteAll()
        已过时。
        从接口复制的说明: CrudService
        Deletes all entities managed by the repository.
        指定者:
        deleteAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
      • findAll

        public <S extends T> java.lang.Iterable<S> findAll​(org.springframework.data.domain.Example<S> example)
        已过时。
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
      • findAll

        public <S extends T> org.springframework.data.domain.Page<S> findAll​(org.springframework.data.domain.Example<S> example,
                                                                             org.springframework.data.domain.Pageable pageable)
        已过时。
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
      • findAll

        public java.util.List<T> findAll​(T entity)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,不带支持权限)
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        返回:
        List
      • findAll

        public org.springframework.data.domain.Page<T> findAll​(T entity,
                                                               org.springframework.data.domain.Pageable pageable)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,不带支持权限)
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        pageable - p
        返回:
        page
      • findAll

        public java.util.List<T> findAll​(T entity,
                                         org.springframework.data.domain.ExampleMatcher matcher)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,不带支持权限)
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        返回:
        List
      • findAll

        public org.springframework.data.domain.Page<T> findAll​(T entity,
                                                               org.springframework.data.domain.ExampleMatcher matcher,
                                                               org.springframework.data.domain.Pageable pageable)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,不带支持权限)
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - e
        pageable - p
        返回:
        p
      • findAllWithDataRule

        public java.util.List<T> findAllWithDataRule​(T entity)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,支持权限)
        指定者:
        findAllWithDataRule 在接口中 DataRuleService<T,​ID extends java.io.Serializable>
        参数:
        entity - e
        返回:
        List
      • findAllWithDataRule

        public org.springframework.data.domain.Page<T> findAllWithDataRule​(T entity,
                                                                           org.springframework.data.domain.Pageable pageable)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,支持权限)
        指定者:
        findAllWithDataRule 在接口中 DataRuleService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        pageable - p
        返回:
        page
      • findAllWithDataRule

        public java.util.List<T> findAllWithDataRule​(T entity,
                                                     org.springframework.data.domain.ExampleMatcher matcher)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(全部,过滤已删除数据,支持权限)
        指定者:
        findAllWithDataRule 在接口中 DataRuleService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        matcher - 一般用来 ignore一组不需要自动匹配的属性
        返回:
        List
      • findAllWithDataRule

        public org.springframework.data.domain.Page<T> findAllWithDataRule​(T entity,
                                                                           org.springframework.data.domain.ExampleMatcher matcher,
                                                                           org.springframework.data.domain.Pageable pageable)
        已过时。
        解析form表单提交的查询entity,生成复杂查询(分页,过滤已删除数据,支持权限)
        指定者:
        findAllWithDataRule 在接口中 DataRuleService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        pageable - page
        matcher - 一般用来 ignore一组不需要自动匹配的属性
        返回:
        Page
      • delete

        public void delete​(ID id,
                           boolean isPhysical)
        已过时。
        从接口复制的说明: CrudService
        Deletes the entity with the given id.
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        id - must not be null.
        isPhysical - default 'false' when the entity is reparable and give 'true' for need deleted by physical. Otherwise it will no use, same as delete(T)
      • delete

        public void delete​(java.util.List<ID> ids,
                           boolean isPhysical)
        已过时。
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
      • delete

        public void delete​(ID[] ids,
                           boolean isPhysical)
        已过时。
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
      • delete

        public void delete​(T entity,
                           boolean isPhysical)
        已过时。
        从接口复制的说明: CrudService
        Deletes a given entity.
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - entity
        isPhysical - py
      • delete

        public void delete​(java.lang.Iterable<? extends T> entities,
                           boolean isPhysical)
        已过时。
        从接口复制的说明: CrudService
        Deletes the given entities.
        指定者:
        delete 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entities - entities
        isPhysical - py
      • deleteAll

        public void deleteAll​(boolean isPhysical)
        已过时。
        从接口复制的说明: CrudService
        Deletes all entities managed by the repository.
        指定者:
        deleteAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        isPhysical - py
      • tagDelete

        protected void tagDelete​(ID id)
        已过时。
      • tagDelete

        protected void tagDelete​(T entity)
        已过时。
      • checkDeleteable

        protected boolean checkDeleteable​(T entity)
        已过时。
      • checkDeleteable

        protected boolean checkDeleteable​(ID id)
        已过时。
      • update

        public T update​(ID id,
                        T entity)
        已过时。
        从接口复制的说明: CrudService
        fetch an entity
        指定者:
        update 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        id - id
        entity - en
        返回:
        T
      • withDataRule

        public org.springframework.data.jpa.domain.Specification<T> withDataRule​(org.springframework.data.jpa.domain.Specification<T> specification)
        已过时。
        从接口复制的说明: DataRuleService
        给传入的条件拼接数据范围条件
        指定者:
        withDataRule 在接口中 DataRuleService<T,​ID extends java.io.Serializable>
        参数:
        specification - sp
        返回:
        已拼接数据权限的条件
      • handleQueryAnnotation

        public org.springframework.data.jpa.domain.Specification<T> handleQueryAnnotation​(T entity)
        已过时。
        解析实体类上的Query*注解生成Specification
        指定者:
        handleQueryAnnotation 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        返回:
        Specification
      • handleQueryAnnotation

        public org.springframework.data.jpa.domain.Specification<T> handleQueryAnnotation​(T entity,
                                                                                          org.springframework.data.domain.ExampleMatcher matcher)
        已过时。
        解析实体类上的Query*注解生成Specification, 带过滤条件
        指定者:
        handleQueryAnnotation 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        entity - E
        返回:
        Specification
      • findAllWithDataRule

        public java.util.List<T> findAllWithDataRule​(org.springframework.data.jpa.domain.Specification<T> specification)
        已过时。
        从接口复制的说明: DataRuleService
        根据传入的查询条件拼接上数据范围条件后查询
        指定者:
        findAllWithDataRule 在接口中 DataRuleService<T,​ID extends java.io.Serializable>
        参数:
        specification - sp
        返回:
        带权限范围的数据集合
      • findAllWithDataRule

        public org.springframework.data.domain.Page<T> findAllWithDataRule​(org.springframework.data.jpa.domain.Specification<T> specification,
                                                                           org.springframework.data.domain.Pageable pageable)
        已过时。
        从接口复制的说明: DataRuleService
        根据传入的查询条件拼接上数据范围条件后查询(分页)
        指定者:
        findAllWithDataRule 在接口中 DataRuleService<T,​ID extends java.io.Serializable>
        参数:
        specification - sp
        pageable - p
        返回:
        带权限范围的数据集合
      • findOne

        public T findOne​(org.springframework.data.jpa.domain.Specification<T> spec)
        已过时。
        从接口复制的说明: CrudService
        Returns a single entity matching the given Specification.
        指定者:
        findOne 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        spec - spec
        返回:
        T
      • findAll

        public java.util.List<T> findAll​(org.springframework.data.jpa.domain.Specification<T> spec)
        已过时。
        从接口复制的说明: CrudService
        Returns all entities matching the given Specification.
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        spec - spec
        返回:
        List T
      • findAll

        public org.springframework.data.domain.Page<T> findAll​(org.springframework.data.jpa.domain.Specification<T> spec,
                                                               org.springframework.data.domain.Pageable pageable)
        已过时。
        从接口复制的说明: CrudService
        Returns a Page of entities matching the given Specification.
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        spec - spec
        pageable - page
        返回:
        Page T
      • findAll

        public java.util.List<T> findAll​(org.springframework.data.jpa.domain.Specification<T> spec,
                                         org.springframework.data.domain.Sort sort)
        已过时。
        从接口复制的说明: CrudService
        Returns all entities matching the given Specification and Sort.
        指定者:
        findAll 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        spec - spec
        sort - sort
        返回:
        List T
      • count

        public long count​(org.springframework.data.jpa.domain.Specification<T> spec)
        已过时。
        从接口复制的说明: CrudService
        Returns the number of instances that the given Specification will return.
        指定者:
        count 在接口中 CrudService<T,​ID extends java.io.Serializable>
        参数:
        spec - the Specification to count instances for
        返回:
        the number of instances