Class BeanMapHelp<T>
java.lang.Object
io.ebeaninternal.server.deploy.BeanMapHelp<T>
- All Implemented Interfaces:
BeanCollectionHelp<T>, CQueryCollectionAdd<T>
- Direct Known Subclasses:
BeanMapHelpElement
Helper specifically for dealing with Maps.
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(io.ebean.bean.BeanCollection<?> collection, io.ebean.bean.EntityBean bean, boolean withCheck) Add a bean to the List Set or Map.final io.ebean.bean.BeanCollection<T> createEmpty(io.ebean.bean.EntityBean ownerBean) Create an empty collection of the correct type.final io.ebean.bean.BeanCollection<T> Create an empty collection of the correct type without a parent bean.final ObjectCreate and return an empty 'vanilla' collection that does not support lazy loading.final io.ebean.bean.BeanCollection<T> createReference(io.ebean.bean.EntityBean parentBean) Create a lazy loading proxy for a List Set or Map.final io.ebean.bean.BeanCollectionAddgetBeanCollectionAdd(Object bc, String mapKey) Return the mechanism to add beans to the underlying collection.final voidjsonWrite(SpiJsonWriter ctx, String name, Object collection, boolean explicitInclude) Write the collection out as json.final voidrefresh(io.ebean.bean.BeanCollection<?> bc, io.ebean.bean.EntityBean parentBean) Apply the new refreshed BeanCollection to the appropriate property of the parent bean.final voidsetLoader(io.ebean.bean.BeanCollectionLoader loader) Set the EbeanServer that owns the configuration.final Collectionunderlying(Object value) Return the underlying collection of beans.
-
Method Details
-
getBeanCollectionAdd
Description copied from interface:BeanCollectionHelpReturn the mechanism to add beans to the underlying collection.For Map's this needs to take the mapKey.
-
createEmptyReference
Description copied from interface:BeanCollectionHelpCreate and return an empty 'vanilla' collection that does not support lazy loading. -
createEmptyNoParent
Description copied from interface:BeanCollectionHelpCreate an empty collection of the correct type without a parent bean. -
createEmpty
Description copied from interface:BeanCollectionHelpCreate an empty collection of the correct type. -
add
public void add(io.ebean.bean.BeanCollection<?> collection, io.ebean.bean.EntityBean bean, boolean withCheck) Description copied from interface:BeanCollectionHelpAdd a bean to the List Set or Map.- Specified by:
addin interfaceBeanCollectionHelp<T>- Specified by:
addin interfaceCQueryCollectionAdd<T>
-
createReference
Description copied from interface:BeanCollectionHelpCreate a lazy loading proxy for a List Set or Map. -
refresh
public final void refresh(io.ebean.bean.BeanCollection<?> bc, io.ebean.bean.EntityBean parentBean) Description copied from interface:BeanCollectionHelpApply the new refreshed BeanCollection to the appropriate property of the parent bean. -
jsonWrite
public final void jsonWrite(SpiJsonWriter ctx, String name, Object collection, boolean explicitInclude) throws IOException Description copied from interface:BeanCollectionHelpWrite the collection out as json.- Throws:
IOException
-
setLoader
public final void setLoader(io.ebean.bean.BeanCollectionLoader loader) Description copied from interface:BeanCollectionHelpSet the EbeanServer that owns the configuration.- Specified by:
setLoaderin interfaceBeanCollectionHelp<T>
-
underlying
Description copied from interface:BeanCollectionHelpReturn the underlying collection of beans.- Specified by:
underlyingin interfaceBeanCollectionHelp<T>
-