Package org.dizitart.no2.store
Class StoreCatalog
- java.lang.Object
-
- org.dizitart.no2.store.StoreCatalog
-
public class StoreCatalog extends Object
The nitrite store catalog containing the name of all collections, repositories and keyed-repositories.- Since:
- 4.0
- Author:
- Anindya Chatterjee
-
-
Constructor Summary
Constructors Constructor Description StoreCatalog(NitriteStore<?> nitriteStore)Instantiates a newStoreCatalog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getCollectionNames()Returns a set of all collection names in the Nitrite database.Map<String,Set<String>>getKeyedRepositoryNames()Returns a set of all keyed-repository names in the Nitrite database.Set<String>getRepositoryNames()Returns a set of all repository names in the Nitrite database.voidremove(String name)Removes the entry from the catalog specified by a name.voidwriteCollectionEntry(String name)Writes a new entry for a collection with the given name to the store catalog.voidwriteKeyedRepositoryEntry(String name)Writes a keyed repository entry to the store catalog.voidwriteRepositoryEntry(String name)Writes a repository entry with the given name to the store catalog.
-
-
-
Constructor Detail
-
StoreCatalog
public StoreCatalog(NitriteStore<?> nitriteStore)
Instantiates a newStoreCatalog.- Parameters:
nitriteStore- the nitrite store
-
-
Method Detail
-
writeCollectionEntry
public void writeCollectionEntry(String name)
Writes a new entry for a collection with the given name to the store catalog.- Parameters:
name- the name of the collection to add to the catalog
-
writeRepositoryEntry
public void writeRepositoryEntry(String name)
Writes a repository entry with the given name to the store catalog.- Parameters:
name- the name of the repository to be added to the catalog
-
writeKeyedRepositoryEntry
public void writeKeyedRepositoryEntry(String name)
Writes a keyed repository entry to the store catalog.- Parameters:
name- the name of the keyed repository to be added
-
getCollectionNames
public Set<String> getCollectionNames()
Returns a set of all collection names in the Nitrite database.- Returns:
- a set of all collection names in the Nitrite database
-
getRepositoryNames
public Set<String> getRepositoryNames()
Returns a set of all repository names in the Nitrite database.- Returns:
- a set of all repository names in the Nitrite database
-
getKeyedRepositoryNames
public Map<String,Set<String>> getKeyedRepositoryNames()
Returns a set of all keyed-repository names in the Nitrite database.- Returns:
- a set of all keyed-repository names in the Nitrite database
-
remove
public void remove(String name)
Removes the entry from the catalog specified by a name.- Parameters:
name- the name
-
-