Class TenantRepositoryImpl
- java.lang.Object
-
- org.craftercms.commons.mongo.AbstractJongoRepository<Tenant>
-
- org.craftercms.profile.repositories.impl.TenantRepositoryImpl
-
- All Implemented Interfaces:
org.craftercms.commons.mongo.CrudRepository<Tenant>
,TenantRepository
public class TenantRepositoryImpl extends org.craftercms.commons.mongo.AbstractJongoRepository<Tenant> implements TenantRepository
Default implementation ofTenantRepository
.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_FIND_BY_NAME_QUERY
static String
KEY_INDEX_KEYS
static String
KEY_INDEX_OPTIONS
static String
KEY_REMOVE_BY_NAME_QUERY
-
Constructor Summary
Constructors Constructor Description TenantRepositoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tenant
findByName(String name)
Returns the tenant for the given name.void
init()
void
removeByName(String name)
Removes the tenant for the given name.-
Methods inherited from class org.craftercms.commons.mongo.AbstractJongoRepository
count, count, count, createSortQuery, deleteFile, deleteFile, find, find, findAll, findById, findByStringId, findOne, findOne, getCollection, getFileInfo, getFileInfo, getQueryFor, insert, insert, listFilesByName, readFile, readFile, remove, remove, removeById, removeByStringId, returnList, returnSimple, save, save, saveFile, saveFile, setJongo, setQueries, update, update, update, update, updateFile, updateFile, updateFile, validateObject, validateObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.craftercms.commons.mongo.CrudRepository
count, count, count, deleteFile, deleteFile, find, find, findAll, findById, findByStringId, findOne, findOne, getFileInfo, getFileInfo, insert, insert, listFilesByName, readFile, readFile, remove, remove, removeById, removeByStringId, save, save, saveFile, saveFile, update, update, update, update, updateFile, updateFile, updateFile
-
-
-
-
Field Detail
-
KEY_INDEX_KEYS
public static final String KEY_INDEX_KEYS
- See Also:
- Constant Field Values
-
KEY_INDEX_OPTIONS
public static final String KEY_INDEX_OPTIONS
- See Also:
- Constant Field Values
-
KEY_FIND_BY_NAME_QUERY
public static final String KEY_FIND_BY_NAME_QUERY
- See Also:
- Constant Field Values
-
KEY_REMOVE_BY_NAME_QUERY
public static final String KEY_REMOVE_BY_NAME_QUERY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init() throws Exception
-
findByName
public Tenant findByName(String name) throws org.craftercms.commons.mongo.MongoDataException
Description copied from interface:TenantRepository
Returns the tenant for the given name.- Specified by:
findByName
in interfaceTenantRepository
- Parameters:
name
- the tenant's name- Returns:
- the tenant, or null if not found.
- Throws:
org.craftercms.commons.mongo.MongoDataException
-
removeByName
public void removeByName(String name) throws org.craftercms.commons.mongo.MongoDataException
Description copied from interface:TenantRepository
Removes the tenant for the given name.- Specified by:
removeByName
in interfaceTenantRepository
- Parameters:
name
- the tenant's name- Throws:
org.craftercms.commons.mongo.MongoDataException
-
-