- All Superinterfaces:
CQueryCollectionAdd<T>
- All Known Implementing Classes:
BeanListHelp,BeanListHelpElement,BeanMapHelp,BeanMapHelpElement,BeanSetHelp,BeanSetHelpElement
Helper functions for performing tasks on Lists Sets or Maps.
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BeanCollection<?> collection, EntityBean bean, boolean withCheck) Add a bean to the List Set or Map.createEmpty(EntityBean bean) Create an empty collection of the correct type.Create an empty collection of the correct type without a parent bean.Create and return an empty 'vanilla' collection that does not support lazy loading.createReference(EntityBean parentBean) Create a lazy loading proxy for a List Set or Map.getBeanCollectionAdd(Object bc, String mapKey) Return the mechanism to add beans to the underlying collection.voidjsonWrite(SpiJsonWriter ctx, String name, Object collection, boolean explicitInclude) Write the collection out as json.voidrefresh(BeanCollection<?> bc, EntityBean parentBean) Apply the new refreshed BeanCollection to the appropriate property of the parent bean.voidsetLoader(BeanCollectionLoader loader) Set the EbeanServer that owns the configuration.underlying(Object value) Return the underlying collection of beans.
-
Method Details
-
setLoader
Set the EbeanServer that owns the configuration. -
underlying
Return the underlying collection of beans. -
getBeanCollectionAdd
Return the mechanism to add beans to the underlying collection.For Map's this needs to take the mapKey.
-
createEmptyNoParent
BeanCollection<T> createEmptyNoParent()Create an empty collection of the correct type without a parent bean.- Specified by:
createEmptyNoParentin interfaceCQueryCollectionAdd<T>
-
createEmpty
Create an empty collection of the correct type. -
createEmptyReference
Object createEmptyReference()Create and return an empty 'vanilla' collection that does not support lazy loading. -
add
Add a bean to the List Set or Map.- Specified by:
addin interfaceCQueryCollectionAdd<T>
-
createReference
Create a lazy loading proxy for a List Set or Map. -
refresh
Apply the new refreshed BeanCollection to the appropriate property of the parent bean. -
jsonWrite
void jsonWrite(SpiJsonWriter ctx, String name, Object collection, boolean explicitInclude) throws IOException Write the collection out as json.- Throws:
IOException
-