# ItemKeyedDataSource.LoadInitialParams

Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/ItemKeyedDataSource.jvmAndAndroid.kt+class:androidx.paging.ItemKeyedDataSource.LoadInitialParams) Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

*** ** * ** ***


```
public class ItemKeyedDataSource.LoadInitialParams<Key extends Object>
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```
> PagingSource<Key, Value>
> ```

Holder object for inputs to `https://developer.android.com/reference/androidx/paging/ItemKeyedDataSource#loadInitial(androidx.paging.ItemKeyedDataSource.LoadInitialParams)`.

| Parameters |
|---|---|
| `<Key extends https://developer.android.com/reference/java/lang/Object.html>` | Type of data used to query Value types out of the `https://developer.android.com/reference/androidx/paging/DataSource`. |

## Summary

| ### Public fields |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams#placeholdersEnabled()` **This field is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource |
| `final Key` | `https://developer.android.com/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams#requestedInitialKey()` **This field is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource |
| `final int` | `https://developer.android.com/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams#requestedLoadSize()` **This field is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource |

| ### Public constructors |
|---|
| `<Key extends https://developer.android.com/reference/java/lang/Object.html> [LoadInitialParams](https://developer.android.com/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams#LoadInitialParams(kotlin.Any,kotlin.Int,kotlin.Boolean))( Key requestedInitialKey, int requestedLoadSize, boolean placeholdersEnabled )` **This method is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource |

## Public fields

### placeholdersEnabled

Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
public final boolean placeholdersEnabled
```

> [!CAUTION]
> **This field is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```
> PagingSource<Key, Value>
> ```

Defines whether placeholders are enabled, and whether the loaded total count will be ignored.

### requestedInitialKey

Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
public final Key requestedInitialKey
```

> [!CAUTION]
> **This field is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```
> PagingSource<Key, Value>
> ```

Load items around this key, or at the beginning of the data set if `null` is passed.

Note that this key is generally a hint, and may be ignored if you want to always load from the beginning.

### requestedLoadSize

Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
public final int requestedLoadSize
```

> [!CAUTION]
> **This field is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```
> PagingSource<Key, Value>
> ```

Requested number of items to load.

Note that this may be larger than available data.

## Public constructors

### LoadInitialParams

```
public <Key extends Object> [LoadInitialParams](https://developer.android.com/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams#LoadInitialParams(kotlin.Any,kotlin.Int,kotlin.Boolean))(
    Key requestedInitialKey,
    int requestedLoadSize,
    boolean placeholdersEnabled
)
```

> [!CAUTION]
> **This method is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```
> PagingSource<Key, Value>
> ```

| Parameters |
|---|---|
| `<Key extends https://developer.android.com/reference/java/lang/Object.html>` | Type of data used to query Value types out of the `https://developer.android.com/reference/androidx/paging/DataSource`. |
| `Key requestedInitialKey` | Load items around this key, or at the beginning of the data set if `null` is passed. Note that this key is generally a hint, and may be ignored if you want to always load from the beginning. |
| `int requestedLoadSize` | Requested number of items to load. Note that this may be larger than available data. |
| `boolean placeholdersEnabled` | Defines whether placeholders are enabled, and whether the loaded total count will be ignored. |