All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jivesoftware.util.PersistableMap Maven / Gradle / Ivy

The newest version!
package org.jivesoftware.util;

import java.util.HashMap;
import java.util.Map;

/**
 * This acts as a tag interface. It has no functionality, but it serves to make more clear the
 * intention to pass around a special type of map.
 *
 * @param  key. see {@link Map}
 * @param  value. see {@link Map}
 */
public abstract class PersistableMap extends HashMap {
    private static final long serialVersionUID = 1L;

    /**
     * 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.
     *
     * @param key The property name
     * @param value The property value
     * @param persist True if the changes should be persisted to the database
     * @return The original value or null if the property did not exist
     */
    public abstract V put(K key, V value, boolean persist);
} 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy