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 UserRepository` | `repo` |
    `static java.lang.String` | `REPO_CLASS_PROP_KEY` |
    `static java.lang.String` | `REPO_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.String` | `getItemsListPKey()` |
    `abstract BareJID` | `getRepoUser()` |
    `void` | `reload()` | This method is called to reload items from the database or other permanent storage.
    `void` | `setRepo​(UserRepository userRepository)` |
    `void` | `store()` | 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 java.lang.Iterable

      `forEach, spliterator`

    - ### 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

  - ### Constructor Detail

    - #### UserRepoRepository

          public UserRepoRepository()

  - ### Method Detail

    - #### getRepoUser

          public abstract BareJID getRepoUser()

    - #### getItemsListPKey

          public java.lang.String getItemsListPKey()

    - #### reload

          public void reload()

      Description copied from interface: `ComponentRepository`
      This 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:
        `reload` in interface `ComponentRepository<Item extends RepositoryItem>`
      Overrides:
        `reload` in class `ConfigRepository<Item extends RepositoryItem>`

    - #### setRepo

          public void setRepo​(UserRepository userRepository)

    - #### store

          public void store()

      Description copied from interface: `ComponentRepository`
      The 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:
        `store` in interface `ComponentRepository<Item extends RepositoryItem>`
      Overrides:
        `store` in class `ConfigRepository<Item extends RepositoryItem>`