Package tigase.db.comp
Class UserRepoRepository<Item extends RepositoryItem>
- java.lang.Object
-
- tigase.db.comp.ConfigRepository<Item>
-
- tigase.db.comp.UserRepoRepository<Item>
-
- All Implemented Interfaces:
java.lang.Iterable<Item>,ComponentRepository<Item>,Repository,Initializable,UnregisterAware
- Direct Known Subclasses:
AbstractCompDBRepository,CertificateRepository,ExtServiceDiscoveryUserRepoRepository,TaskConfigItemJDBCRepository,VHostJDBCRepository
public abstract class UserRepoRepository<Item extends RepositoryItem> extends ConfigRepository<Item>
Created: Oct 3, 2009 3:55:27 PM- Author:
- Artur Hefczyc
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tigase.db.Repository
Repository.Meta, Repository.SchemaId
-
-
Field Summary
Fields Modifier and Type Field Description protected UserRepositoryrepostatic java.lang.StringREPO_CLASS_PROP_KEYstatic java.lang.StringREPO_URI_PROP_KEY-
Fields inherited from class tigase.db.comp.ConfigRepository
autoReloadInterval, items, itemsHash
-
Fields inherited from interface tigase.db.comp.ComponentRepository
COMP_REPO_BIND
-
-
Constructor Summary
Constructors Constructor Description UserRepoRepository()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetItemsListPKey()abstract BareJIDgetRepoUser()voidreload()This method is called to reload items from the database or other permanent storage.voidsetRepo(UserRepository userRepository)voidstore()The method is called to store all data in the database.-
Methods inherited from class tigase.db.comp.ConfigRepository
addItem, addItemNoStore, addRepoChangeListener, allItems, beforeUnregister, contains, getConfigKey, getDefaultItems, getDefaultPropetyItems, getDefaults, getItem, getItemsOld, getPropertyKey, initialize, initItemsMap, isInitialized, itemChanged, iterator, removeItem, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setAutoReloadInterval, setItemsOld, setProperties, size, toString, validateItem
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface tigase.db.comp.ComponentRepository
destroy, getItemInstance
-
Methods inherited from interface tigase.db.Repository
initRepository
-
-
-
-
Field Detail
-
REPO_CLASS_PROP_KEY
public static final java.lang.String REPO_CLASS_PROP_KEY
- See Also:
- Constant Field Values
-
REPO_URI_PROP_KEY
public static final java.lang.String REPO_URI_PROP_KEY
- See Also:
- Constant Field Values
-
repo
@Inject protected UserRepository repo
-
-
Method Detail
-
getRepoUser
public abstract BareJID getRepoUser()
-
getItemsListPKey
public java.lang.String getItemsListPKey()
-
reload
public void reload()
Description copied from interface:ComponentRepositoryThis method is called to reload items from the database or other permanent storage. It is possible that items list is modified externally by third-party system. When all modifications are done this method is called to refresh the class cache. Whether the implementation load whole list or just last modifications is implementation dependent.- Specified by:
reloadin interfaceComponentRepository<Item extends RepositoryItem>- Overrides:
reloadin classConfigRepository<Item extends RepositoryItem>
-
setRepo
public void setRepo(UserRepository userRepository)
-
store
public void store()
Description copied from interface:ComponentRepositoryThe method is called to store all data in the database. It is used when the repository has been changed in some way and the changes have to be put to a permanent storage for later retrieval.- Specified by:
storein interfaceComponentRepository<Item extends RepositoryItem>- Overrides:
storein classConfigRepository<Item extends RepositoryItem>
-
-