
io.ebeaninternal.server.deploy.BeanListHelpElement 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.ebeaninternal.api.json.SpiJsonWriter;
/**
* Helper for element collection List.
*/
public class BeanListHelpElement extends BeanListHelp {
BeanListHelpElement(BeanPropertyAssocMany many) {
super(many);
}
@Override
public void add(BeanCollection> collection, EntityBean bean, boolean withCheck) {
Object elementValue = bean._ebean_getField(0);
if (withCheck) {
collection.internalAddWithCheck(elementValue);
} else {
collection.internalAdd(elementValue);
}
}
@Override
void jsonWriteElement(SpiJsonWriter ctx, Object element) {
many.jsonWriteElementValue(ctx, element);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy