---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# 페이지 매김 클래스 - Android

# 페이지 매김 클래스 - Android {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 11분

Paginator 클래스는 NowTableService 클래스에서 반환되는 것과 같이 REST 엔드포인트 호출에 의해 다시 전달된 반환 결과를 페이징하는 함수를 제공합니다.

먼저 or [NowTableService - paginator\<Model: Decodable\>(from tableName: String, path: String = Constants.resultPath, coder: Coder = .default, configuration: FetchConfiguration? = nil)](https://servicenow-prod.fluidtopics.net/u6t2OtbkgbZ8ejLrrT~GfA#NTblServ-paginator_S_S_S_O "중첩을 처리하는 디코딩된 모델 페이지의 반복을 활성화하는 페이지 매김기를 생성합니다.") 함수를 [NowTableService - 페이지 매김자(from tableName: String, configuration: FetchConfiguration? = nil)](https://servicenow-prod.fluidtopics.net/u6t2OtbkgbZ8ejLrrT~GfA#NTblServ-paginator_S_O "기록 페이지를 반복할 수 있는 페이지 매김기를 생성합니다.") 호출하여 페이지 매김 반환 결과를 검색해야 합니다.

## 페이지 매김기 - first() {#ariaid-title2}

반환 결과의 첫 페이지를 가져옵니다.
메서드는 첫 번째 페이지를 가져올 수 없는 경우 `PaginationError` 를 발생시킵니다.
{#PaginatorAnd-first__table_fpc_bgv_kqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 1. 매개변수]

{#PaginatorAnd-first__table_fpc_bgv_kqb} {#PaginatorAnd-first__table_gpc_bgv_kqb__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 2. 반환]

{#PaginatorAnd-first__table_gpc_bgv_kqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      paginator.first()
    }

## 페이지 매김기 - hasNext() {#ariaid-title3}

반환 결과에 다음 페이지가 있는지 확인합니다.
{#PaginatorAnd-hasNext__table_fxz_rww_rqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 3. 매개변수]

{#PaginatorAnd-hasNext__table_fxz_rww_rqb} {#PaginatorAnd-hasNext__table_gxz_rww_rqb__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | 반환 결과에 다음 페이지가 있는지 여부를 나타내는 플래그입니다. 가능한 값: * true: 다음 페이지를 사용할 수 있습니다. * false: 사용 가능한 다음 페이지가 없습니다. |
[표 4. 반환]

{#PaginatorAnd-hasNext__table_gxz_rww_rqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      if (paginator.hasNext() && !paginator.isBusy()) {
        paginator.next()
      }
    }

## 페이지 매김기 - hasPrevious() {#ariaid-title4}

반환 결과의 이전 페이지에 있는지 확인합니다.
{#PaginatorAnd-hasPrevious__table_qy4_dxw_rqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 5. 매개변수]

{#PaginatorAnd-hasPrevious__table_qy4_dxw_rqb} {#PaginatorAnd-hasPrevious__table_ry4_dxw_rqb__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | 반환 결과에 이전 페이지가 있는지 여부를 나타내는 플래그입니다. 가능한 값: * true: 이전 페이지를 사용할 수 있습니다. * false: 사용 가능한 이전 페이지가 없습니다. |
[표 6. 반환]

{#PaginatorAnd-hasPrevious__table_ry4_dxw_rqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      if (paginator.hasPrevious() && !paginator.isBusy()) {
        paginator.previous()
      }
    }

## 페이지 매김기 - isBusy() {#ariaid-title5}

페이지 매김자가 데이터를 가져오는 중에 사용 중인지 확인합니다.
{#PaginatorAnd-isBusy__table_w3d_cyw_rqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 7. 매개변수]

{#PaginatorAnd-isBusy__table_w3d_cyw_rqb} {#PaginatorAnd-isBusy__table_x3d_cyw_rqb__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 | 페이지 매김자가 데이터를 가져오는 중인지 여부를 나타내는 플래그입니다. 가능한 값: * true: 데이터를 가져오는 중입니다. * false: 사용 중이 아닙니다. |
[표 8. 반환]

{#PaginatorAnd-isBusy__table_x3d_cyw_rqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      if (paginator.hasNext() && !paginator.isBusy()) {
        paginator.next()
      }
    }

## 페이지 매김 - last() {#ariaid-title6}

반환 결과의 마지막 페이지를 가져옵니다.
메서드는 마지막 페이지를 가져올 수 없는 경우 `PaginationError` 를 throw합니다.
{#PaginatorAnd-last__table_ipy_hgv_kqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 9. 매개변수]

{#PaginatorAnd-last__table_ipy_hgv_kqb} {#PaginatorAnd-last__table_jpy_hgv_kqb__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 10. 반환]

{#PaginatorAnd-last__table_jpy_hgv_kqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      if !paginator.isBusy()) {
        paginator.last()
      }
    }

## 페이지 매김기 - next() {#ariaid-title7}

반환 결과의 다음 페이지를 가져옵니다.
메서드는 가져올 페이지가 더 이상 없는 경우 `PaginationError` 를 throw합니다.
{#PaginatorAnd-next__table_kj5_5cv_kqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 11. 매개변수]

{#PaginatorAnd-next__table_kj5_5cv_kqb} {#PaginatorAnd-next__table_lj5_5cv_kqb__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 12. 반환]

{#PaginatorAnd-next__table_lj5_5cv_kqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      if (paginator.hasNext() && !paginator.isBusy()) {
        paginator.next()
      }
    }

## 페이지 매김 - 관찰(콜백: PaginatorCallBack\<T\>) {#ariaid-title8}

Paginator 객체의 콜백을 설정합니다. 다른 Paginator 함수를 호출하기 전에 이 메서드를 호출해야 합니다.
{#PaginatorAnd-observe_O__table_yj5_yyw_rqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 콜백 | 페이지 매김자콜백 | 페이지 매김기 생성의 성공 또는 실패에 따라 호출할 콜백입니다. * 성공: `추상적인 재미 onSuccess(응답: 응답<목록<T>>)` * 실패: `추상적인 재미 onFailure(e: NowDataError)` |
[표 13. 매개변수]

{#PaginatorAnd-observe_O__table_yj5_yyw_rqb} {#PaginatorAnd-observe_O__table_zj5_yyw_rqb__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 14. 반환]

{#PaginatorAnd-observe_O__table_zj5_yyw_rqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginationCallBack = object : PaginatorCallBack<NowAttachmentMetadata> {
        override fun onFailure(e: NowDataError) {
          handleError(e)
        }

        override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
          handleResponse(response)
        }

      }

      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(paginationCallBack)
        ?: throw Exception("Response is null")
    }

## 페이지 매김 - 이전() {#ariaid-title9}

반환 결과의 이전 페이지를 가져옵니다.
이 메서드는 이전 페이지를 가져올 수 없는 경우 `PaginationError` 를 throw합니다.
{#PaginatorAnd-previous__table_lby_sfv_kqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 15. 매개변수]

{#PaginatorAnd-previous__table_lby_sfv_kqb} {#PaginatorAnd-previous__table_mby_sfv_kqb__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 16. 반환]

{#PaginatorAnd-previous__table_mby_sfv_kqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      if (paginator.hasPrevious() && !paginator.isBusy()) {
        paginator.previous()
      }
    }

## 페이지 매김기 - reset() {#ariaid-title10}

페이지 매김기를 다시 첫 번째 페이지로 재설정하지만 반환 결과의 첫 번째 페이지는 반환하지 않습니다.
{#PaginatorAnd-reset__table_u1y_mgv_kqb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 17. 매개변수]

{#PaginatorAnd-reset__table_u1y_mgv_kqb} {#PaginatorAnd-reset__table_v1y_mgv_kqb__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 18. 반환]

{#PaginatorAnd-reset__table_v1y_mgv_kqb}  
다음 코드 예제에서는 이 함수를 호출하는 방법을 보여 줍니다.

    suspend fun createAttachmentMetadataPaginator() {
      val paginator = nowServiceManager.getNowAttachmentService()?.attachmentMetadataPaginator(null, 10)
        ?.observe(object : PaginatorCallBack<NowAttachmentMetadata> {
          override fun onFailure(e: NowDataError) {
            handleError(e)
          }

          override fun onSuccess(response: Response<List<NowAttachmentMetadata>>) {
            handleResponse(response)
          }

        })
        ?: throw Exception("Response is null")

      paginator.reset()
    }


