Uses of Interface
com.flowlogix.jeedao.primefaces.CursorPagination

Packages that use CursorPagination
Package
Description
PrimeFaces JPA-backed JPALazyDataModel
  • Uses of CursorPagination in com.flowlogix.jeedao.primefaces

    Methods in com.flowlogix.jeedao.primefaces that return types with arguments of type CursorPagination
    Modifier and Type
    Method
    Description
    static <TT> Lazy<CursorPagination<TT>>
    CursorPagination.create(Function<com.flowlogix.jeedao.primefaces.CursorPagination.Config.ConfigBuilder<TT>, CursorPagination.Config<TT>> configConsumer)

    Creates a default implementation of cursor pagination

    @Named
    @ViewScoped
    public class CursorDataModel implements Serializable {
        @Inject
        @Getter
        JPALazyDataModel<UserEntity> userModel;
    
        @PostConstruct
        void initialize() {
            // configure cursor pagination by id field
            userModel.initialize(builder -> builder
                    .cursor(CursorPagination.create(config -> config.supportedFields(List.of(
                                    new Field<>(() -> UserEntity_.id.getName(), UserEntity::getId)
                    )).build())).build());
        }
    }
    
    static <TT> Lazy<CursorPagination<TT>>
    CursorPagination.noop()
    Returns a no-op implementation of CursorPagination that can be used when cursor pagination is not supported or desired.