ca.pjer.spring.boot.jdbi.MultiBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdbi-spring-boot-starter Show documentation
Show all versions of jdbi-spring-boot-starter Show documentation
This is a Spring Boot Starter for auto creating Jdbi and SqlObject
The newest version!
package ca.pjer.spring.boot.jdbi;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class MultiBean implements Cloneable, Serializable {
private final Map beans = new HashMap<>();
void put(Class type, Object bean) {
beans.put(type, bean);
}
public Set typeSet() {
return beans.keySet();
}
public T get(Class type) {
return type.cast(beans.get(type));
}
@Override
public int hashCode() {
return beans.hashCode();
}
@Override
public boolean equals(Object o) {
return beans.equals(o);
}
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
@Override
public String toString() {
return beans.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy