io.ebeaninternal.server.deploy.BeanMapHelpElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.server.deploy;
import io.ebean.bean.BeanCollection;
import io.ebean.bean.EntityBean;
import io.ebean.common.BeanMap;
import io.ebeaninternal.api.json.SpiJsonWriter;
public class BeanMapHelpElement extends BeanMapHelp {
BeanMapHelpElement(BeanPropertyAssocMany many) {
super(many);
}
@Override
public void add(BeanCollection> collection, EntityBean bean, boolean withCheck) {
Object key = bean._ebean_getField(0);
Object val = bean._ebean_getField(1);
BeanMap, ?> map = ((BeanMap, ?>) collection);
if (withCheck) {
map.internalPutWithCheck(key, val);
} else {
map.internalPut(key, val);
}
}
@Override
void jsonWriteElement(SpiJsonWriter ctx, Object element) {
throw new IllegalStateException("not called");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy