
rs.data.impl.dto.MapDTO Maven / Gradle / Ivy
/**
*
*/
package rs.data.impl.dto;
import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* A DTO using a Map object as storage.
* @author ralph
*
*/
public class MapDTO extends GeneralDTO {
/** Serial UID */
private static final long serialVersionUID = 1L;
/** The properties object */
private Map map;
/**
* Constructor.
*/
public MapDTO() {
map = new HashMap();
}
/**
* Returns a property.
* @param name key of property.
* @return value of property
*/
public Object getProperty(String name) {
return map.get(name);
}
/**
* Sets a property.
* @param name key of property
* @param value new value of property
*/
public void setProperty(String name, Object value) {
map.put(name, value);
}
/**
* Returns the {@link #map}.
* @return the map
*/
public Map getProperties() {
return Collections.unmodifiableMap(map);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy