Package io.ebeaninternal.server.deploy
Interface BeanCollectionHelp<T>
-
- All Superinterfaces:
CQueryCollectionAdd<T>
- All Known Implementing Classes:
BeanListHelp
,BeanListHelpElement
,BeanMapHelp
,BeanMapHelpElement
,BeanSetHelp
,BeanSetHelpElement
public interface BeanCollectionHelp<T> extends CQueryCollectionAdd<T>
Helper functions for performing tasks on Lists Sets or Maps.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(BeanCollection<?> collection, EntityBean bean, boolean withCheck)
Add a bean to the List Set or Map.BeanCollection<T>
createEmpty(EntityBean bean)
Create an empty collection of the correct type.BeanCollection<T>
createEmptyNoParent()
Create an empty collection of the correct type without a parent bean.BeanCollection<T>
createReference(EntityBean parentBean)
Create a lazy loading proxy for a List Set or Map.BeanCollectionAdd
getBeanCollectionAdd(Object bc, String mapKey)
Return the mechanism to add beans to the underlying collection.void
jsonWrite(SpiJsonWriter ctx, String name, Object collection, boolean explicitInclude)
Write the collection out as json.void
refresh(BeanCollection<?> bc, EntityBean parentBean)
Apply the new refreshed BeanCollection to the appropriate property of the parent bean.void
refresh(SpiEbeanServer server, Query<?> query, Transaction t, EntityBean parentBean)
Refresh the List Set or Map.void
setLoader(BeanCollectionLoader loader)
Set the EbeanServer that owns the configuration.Collection
underlying(Object value)
Return the underlying collection of beans.
-
-
-
Method Detail
-
setLoader
void setLoader(BeanCollectionLoader loader)
Set the EbeanServer that owns the configuration.
-
underlying
Collection underlying(Object value)
Return the underlying collection of beans.
-
getBeanCollectionAdd
BeanCollectionAdd getBeanCollectionAdd(Object bc, String mapKey)
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:
createEmptyNoParent
in interfaceCQueryCollectionAdd<T>
-
createEmpty
BeanCollection<T> createEmpty(EntityBean bean)
Create an empty collection of the correct type.
-
add
void add(BeanCollection<?> collection, EntityBean bean, boolean withCheck)
Add a bean to the List Set or Map.- Specified by:
add
in interfaceCQueryCollectionAdd<T>
-
createReference
BeanCollection<T> createReference(EntityBean parentBean)
Create a lazy loading proxy for a List Set or Map.
-
refresh
void refresh(SpiEbeanServer server, Query<?> query, Transaction t, EntityBean parentBean)
Refresh the List Set or Map.
-
refresh
void refresh(BeanCollection<?> bc, EntityBean parentBean)
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
-
-