mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
38 lines
803 B
Java
38 lines
803 B
Java
package com.alibaba.druid.mapping;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
|
|
public class MappingObject {
|
|
private Map<String, Object> attributes;
|
|
|
|
public Map<String, Object> getAttributes() {
|
|
if (attributes == null) {
|
|
attributes = new HashMap<String, Object>(1);
|
|
}
|
|
|
|
return attributes;
|
|
}
|
|
|
|
public Object getAttribute(String name) {
|
|
if (attributes == null) {
|
|
return null;
|
|
}
|
|
|
|
return attributes.get(name);
|
|
}
|
|
|
|
public void putAttribute(String name, Object value) {
|
|
if (attributes == null) {
|
|
attributes = new HashMap<String, Object>(1);
|
|
}
|
|
|
|
attributes.put(name, value);
|
|
}
|
|
|
|
public Map<String, Object> getAttributesDirect() {
|
|
return attributes;
|
|
}
|
|
}
|