/** * Add the bean to the appropriate collection on the parent bean. */ @Override public void addBeanToCollectionWithCreate(EntityBean parentBean, EntityBean detailBean, boolean withCheck) { BeanCollection<?> bc = (BeanCollection<?>) super.getValue(parentBean); if (bc == null) { bc = help.createEmpty(parentBean); setValue(parentBean, bc); } help.add(bc, detailBean, withCheck); }
public BeanCollection<?> createReference(EntityBean parentBean) { BeanCollection<?> ref = help.createReference(parentBean); setValue(parentBean, ref); return ref; }
public BeanCollectionAdd getBeanCollectionAdd(Object bc, String mapKey) { return help.getBeanCollectionAdd(bc, mapKey); }
/** * Write the collection to JSON. */ public void jsonWriteCollection(SpiJsonWriter ctx, String name, Object value, boolean explicitInclude) throws IOException { help.jsonWrite(ctx, name, value, explicitInclude); }
/** * Return the underlying collection of beans. */ public Collection getRawCollection(EntityBean bean) { return help.underlying(getVal(bean)); }
/** * Set the lazy load server to help create reference collections (that lazy * load on demand). */ public void setEbeanServer(SpiEbeanServer server) { if (help != null) { help.setLoader(server); } if (manyToMany) { intersectionTable = initIntersectionTable(); } }
public BeanCollection<T> createEmpty(EntityBean parentBean) { return help.createEmpty(parentBean); }
public void add(BeanCollection<?> collection, EntityBean bean) { help.add(collection, bean, false); }
/** * Write the collection to JSON. */ public String jsonWriteCollection(Object value) throws IOException { StringWriter writer = new StringWriter(300); SpiJsonWriter ctx = descriptor.createJsonWriter(writer); help.jsonWrite(ctx, null, value, true); ctx.flush(); return writer.toString(); }
/** * Return the underlying collection of beans. */ public Collection getRawCollection(EntityBean bean) { return help.underlying(getVal(bean)); }
/** * Set the lazy load server to help create reference collections (that lazy * load on demand). */ public void setEbeanServer(SpiEbeanServer server) { if (help != null) { help.setLoader(server); } if (manyToMany) { intersectionTable = initIntersectionTable(); } }
public BeanCollection<T> createEmpty(EntityBean parentBean) { return help.createEmpty(parentBean); }
public void add(BeanCollection<?> collection, EntityBean bean) { help.add(collection, bean, false); }
/** * Add the bean to the appropriate collection on the parent bean. */ @Override public void addBeanToCollectionWithCreate(EntityBean parentBean, EntityBean detailBean, boolean withCheck) { BeanCollection<?> bc = (BeanCollection<?>) super.getValue(parentBean); if (bc == null) { bc = help.createEmpty(parentBean); setValue(parentBean, bc); } help.add(bc, detailBean, withCheck); }
/** * Write the collection to JSON. */ public void jsonWriteCollection(SpiJsonWriter ctx, String name, Object value, boolean explicitInclude) throws IOException { help.jsonWrite(ctx, name, value, explicitInclude); }
public BeanCollection<?> createReference(EntityBean parentBean) { BeanCollection<?> ref = help.createReference(parentBean); setValue(parentBean, ref); return ref; }
public BeanCollectionAdd getBeanCollectionAdd(Object bc, String mapKey) { return help.getBeanCollectionAdd(bc, mapKey); }
/** * Write the collection to JSON. */ public String jsonWriteCollection(Object value) throws IOException { StringWriter writer = new StringWriter(300); SpiJsonWriter ctx = descriptor.createJsonWriter(writer); help.jsonWrite(ctx, null, value, true); ctx.flush(); return writer.toString(); }