public class

FtsOptionsBundle

extends java.lang.Object

implements androidx.room.migration.bundle.SchemaEquality<FtsOptionsBundle>

 java.lang.Object

↳androidx.room.migration.bundle.FtsOptionsBundle

Overview

Data class that holds FTS Options of an Fts3 or Fts4.

Summary

Constructors
publicFtsOptionsBundle(java.lang.String tokenizer, java.util.List<java.lang.String> tokenizerArgs, java.lang.String contentTable, java.lang.String languageIdColumnName, java.lang.String matchInfo, java.util.List<java.lang.String> notIndexedColumns, java.util.List<java.lang.Integer> prefixSizes, java.lang.String preferredOrder)

Methods
public java.lang.StringgetContentTable()

public booleanisSchemaEqual(FtsOptionsBundle other)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public FtsOptionsBundle(java.lang.String tokenizer, java.util.List<java.lang.String> tokenizerArgs, java.lang.String contentTable, java.lang.String languageIdColumnName, java.lang.String matchInfo, java.util.List<java.lang.String> notIndexedColumns, java.util.List<java.lang.Integer> prefixSizes, java.lang.String preferredOrder)

Methods

public java.lang.String getContentTable()

Returns:

The external content table name

public boolean isSchemaEqual(FtsOptionsBundle other)

Source

/*
 * Copyright 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.room.migration.bundle;

import androidx.annotation.RestrictTo;
import androidx.room.Fts3;
import androidx.room.Fts4;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * Data class that holds FTS Options of an {@link Fts3 Fts3} or
 * {@link Fts4 Fts4}.
 *
 * @hide
 */
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
public class FtsOptionsBundle implements SchemaEquality<FtsOptionsBundle> {

    @SerializedName("tokenizer")
    private final String mTokenizer;

    @SerializedName("tokenizerArgs")
    private final List<String> mTokenizerArgs;

    @SerializedName("contentTable")
    private final String mContentTable;

    @SerializedName("languageIdColumnName")
    private final String mLanguageIdColumnName;

    @SerializedName("matchInfo")
    private final String mMatchInfo;

    @SerializedName("notIndexedColumns")
    private final List<String> mNotIndexedColumns;

    @SerializedName("prefixSizes")
    private final List<Integer> mPrefixSizes;

    @SerializedName("preferredOrder")
    private final String mPreferredOrder;

    public FtsOptionsBundle(
            String tokenizer,
            List<String> tokenizerArgs,
            String contentTable,
            String languageIdColumnName,
            String matchInfo,
            List<String> notIndexedColumns,
            List<Integer> prefixSizes,
            String preferredOrder) {
        mTokenizer = tokenizer;
        mTokenizerArgs = tokenizerArgs;
        mContentTable = contentTable;
        mLanguageIdColumnName = languageIdColumnName;
        mMatchInfo = matchInfo;
        mNotIndexedColumns = notIndexedColumns;
        mPrefixSizes = prefixSizes;
        mPreferredOrder = preferredOrder;
    }

    /**
     * @return The external content table name
     */
    public String getContentTable() {
        return mContentTable;
    }

    @Override
    public boolean isSchemaEqual(FtsOptionsBundle other) {
        return mTokenizer.equals(other.mTokenizer)
                && mTokenizerArgs.equals(other.mTokenizerArgs)
                && mContentTable.equals(other.mContentTable)
                && mLanguageIdColumnName.equals(other.mLanguageIdColumnName)
                && mMatchInfo.equals(other.mMatchInfo)
                && mNotIndexedColumns.equals(other.mNotIndexedColumns)
                && mPrefixSizes.equals(other.mPrefixSizes)
                && mPreferredOrder.equals(other.mPreferredOrder);

    }
}