Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.group
Class DefaultGroupPropertyMap<K,V>

    java.lang.Object
      java.util.AbstractMap<K,V>
          java.util.HashMap<K,V>
              org.jivesoftware.openfire.group.DefaultGroupPropertyMap<K,V>

Type Parameters:
  `K` - Property key
  `V` - Property value

All Implemented Interfaces:
  Serializable, Cloneable, Map<K,V>

    public class DefaultGroupPropertyMap<K,V>

extends HashMap<K,V>

Default implementation of a writable `Map` to manage group properties. Updates made to the elements in this map will also be applied to the database. Note this implementation assumes group property changes will be relatively infrequent and therefore does not try to optimize database I/O for performance. Each call to a `Map` mutator method (direct or indirect via `Iterator`) will result in a corresponding synchronous update to the database.

See Also:
  Serialized Form

Constructor Summary
`DefaultGroupPropertyMap(Group group)` Group properties map constructor; requires associated `Group` instance

Method Summary
`void` | `clear()`
`Set<Map.Entry<K,V>>` | `entrySet()`
`Set<K>` | `keySet()`
`V` | `put(K key, V value)`
`V` | `put(K key, V value, boolean persist)` Custom method to put properties into the map, optionally without triggering persistence.
`V` | `remove(Object key)`
`Collection<V>` | `values()`

Methods inherited from class java.util.HashMap
`clone, containsKey, containsValue, get, isEmpty, putAll, size`

Methods inherited from class java.util.AbstractMap
`equals, hashCode, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### DefaultGroupPropertyMap

    public DefaultGroupPropertyMap(Group group)

  Group properties map constructor; requires associated `Group` instance

  Parameters:
    `group` - The group that owns these properties

Method Detail

### put

    public V put(K key,
                 V value,
                 boolean persist)

  Custom method to put properties into the map, optionally without triggering persistence. This is used when the map is being initially loaded from the database.

  Parameters:
    `key` - The property name
    `value` - The property value
    `persist` - True if the changes should be persisted to the database
  Returns:
    The original value or null if the property did not exist

### put

    public V put(K key,
                 V value)

  Specified by:
    `put` in interface `Map<K,V>`
  Overrides:
    `put` in class `HashMap<K,V>`

### remove

    public V remove(Object key)

  Specified by:
    `remove` in interface `Map<K,V>`
  Overrides:
    `remove` in class `HashMap<K,V>`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Map<K,V>`
  Overrides:
    `clear` in class `HashMap<K,V>`

### keySet

    public Set<K> keySet()

  Specified by:
    `keySet` in interface `Map<K,V>`
  Overrides:
    `keySet` in class `HashMap<K,V>`

### values

    public Collection<V> values()

  Specified by:
    `values` in interface `Map<K,V>`
  Overrides:
    `values` in class `HashMap<K,V>`

### entrySet

    public Set<Map.Entry<K,V>> entrySet()

  Specified by:
    `entrySet` in interface `Map<K,V>`
  Overrides:
    `entrySet` in class `HashMap<K,V>`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.