Skip to content

Commit 52e0691

Browse files
Add bundle package
This moves the Bundle files to the their own package and deletes the duplicate Bundle class (the same class exists as BundleMetadata, but was merged incorrecly). BundleCache stays in local along with the other persistence classes.
1 parent 90d4c35 commit 52e0691

File tree

11 files changed

+17
-79
lines changed

11 files changed

+17
-79
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/local/BundleMetadata.java renamed to firebase-firestore/src/main/java/com/google/firebase/firestore/bundle/BundleMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package com.google.firebase.firestore.local;
15+
package com.google.firebase.firestore.bundle;
1616

1717
import com.google.firebase.firestore.model.SnapshotVersion;
1818

1919
/** Represents a Firestore bundle saved by the SDK in its local storage. */
20-
/* package */ class BundleMetadata {
20+
/* package */ public class BundleMetadata {
2121
private final String bundleId;
2222
private final int version;
2323
private final SnapshotVersion createTime;

firebase-firestore/src/main/java/com/google/firebase/firestore/local/BundleSerializer.java renamed to firebase-firestore/src/main/java/com/google/firebase/firestore/bundle/BundleSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package com.google.firebase.firestore.local;
15+
package com.google.firebase.firestore.bundle;
1616

1717
import android.util.Base64;
1818
import androidx.annotation.Nullable;

firebase-firestore/src/main/java/com/google/firebase/firestore/local/BundledDocumentMetadata.java renamed to firebase-firestore/src/main/java/com/google/firebase/firestore/bundle/BundledDocumentMetadata.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package com.google.firebase.firestore.local;
15+
package com.google.firebase.firestore.bundle;
1616

1717
import com.google.firebase.firestore.model.DocumentKey;
1818
import com.google.firebase.firestore.model.SnapshotVersion;

firebase-firestore/src/main/java/com/google/firebase/firestore/local/BundledQuery.java renamed to firebase-firestore/src/main/java/com/google/firebase/firestore/bundle/BundledQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package com.google.firebase.firestore.local;
15+
package com.google.firebase.firestore.bundle;
1616

1717
import com.google.firebase.firestore.core.Query;
1818
import com.google.firebase.firestore.core.Target;

firebase-firestore/src/main/java/com/google/firebase/firestore/local/NamedQuery.java renamed to firebase-firestore/src/main/java/com/google/firebase/firestore/bundle/NamedQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package com.google.firebase.firestore.local;
15+
package com.google.firebase.firestore.bundle;
1616

1717
import com.google.firebase.firestore.model.SnapshotVersion;
1818

1919
/** Represents a named query saved by the SDK in its local storage. */
20-
/* package */ class NamedQuery {
20+
/* package */ public class NamedQuery {
2121
private final String name;
2222
private final BundledQuery bundledQuery;
2323
private final SnapshotVersion readTime;

firebase-firestore/src/main/java/com/google/firebase/firestore/local/Bundle.java

Lines changed: 0 additions & 71 deletions
This file was deleted.

firebase-firestore/src/main/java/com/google/firebase/firestore/local/BundleCache.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package com.google.firebase.firestore.local;
1616

1717
import androidx.annotation.Nullable;
18+
import com.google.firebase.firestore.bundle.BundleMetadata;
19+
import com.google.firebase.firestore.bundle.NamedQuery;
1820

1921
/** Provides methods to save and read Firestore bundles. */
2022
public interface BundleCache {

firebase-firestore/src/main/java/com/google/firebase/firestore/local/MemoryBundleCache.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package com.google.firebase.firestore.local;
1616

1717
import androidx.annotation.Nullable;
18+
import com.google.firebase.firestore.bundle.BundleMetadata;
19+
import com.google.firebase.firestore.bundle.NamedQuery;
1820
import java.util.HashMap;
1921
import java.util.Map;
2022

firebase-firestore/src/main/java/com/google/firebase/firestore/local/SQLiteBundleCache.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
import androidx.annotation.Nullable;
2020
import com.google.firebase.Timestamp;
21+
import com.google.firebase.firestore.bundle.BundleMetadata;
22+
import com.google.firebase.firestore.bundle.NamedQuery;
2123
import com.google.firebase.firestore.model.SnapshotVersion;
2224
import com.google.firestore.proto.BundledQuery;
2325
import com.google.protobuf.InvalidProtocolBufferException;

firebase-firestore/src/test/java/com/google/firebase/firestore/local/BundleSerializerTest.java renamed to firebase-firestore/src/test/java/com/google/firebase/firestore/bundle/BundleSerializerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package com.google.firebase.firestore.local;
15+
package com.google.firebase.firestore.bundle;
1616

1717
import static com.google.firebase.firestore.testutil.TestUtil.filter;
1818
import static com.google.firebase.firestore.testutil.TestUtil.key;

firebase-firestore/src/test/java/com/google/firebase/firestore/local/BundleCacheTestCase.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
import static org.junit.Assert.assertNull;
2020

2121
import com.google.firebase.Timestamp;
22+
import com.google.firebase.firestore.bundle.BundleMetadata;
23+
import com.google.firebase.firestore.bundle.BundledQuery;
24+
import com.google.firebase.firestore.bundle.NamedQuery;
2225
import com.google.firebase.firestore.core.Query;
2326
import com.google.firebase.firestore.core.Target;
2427
import com.google.firebase.firestore.model.ResourcePath;

0 commit comments

Comments
 (0)