Package io.ebeaninternal.server.deploy
Class BeanMapHelp<T>
- java.lang.Object
-
- io.ebeaninternal.server.deploy.BeanMapHelp<T>
-
- All Implemented Interfaces:
BeanCollectionHelp<T>
,CQueryCollectionAdd<T>
- Direct Known Subclasses:
BeanMapHelpElement
public class BeanMapHelp<T> extends Object
Helper specifically for dealing with Maps.
-
-
Method Summary
All Methods Instance Methods Concrete 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 ownerBean)
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
-
getBeanCollectionAdd
public BeanCollectionAdd getBeanCollectionAdd(Object bc, String mapKey)
Description copied from interface:BeanCollectionHelp
Return the mechanism to add beans to the underlying collection.For Map's this needs to take the mapKey.
-
createEmptyNoParent
public BeanCollection<T> createEmptyNoParent()
Description copied from interface:BeanCollectionHelp
Create an empty collection of the correct type without a parent bean.
-
createEmpty
public BeanCollection<T> createEmpty(EntityBean ownerBean)
Description copied from interface:BeanCollectionHelp
Create an empty collection of the correct type.
-
add
public void add(BeanCollection<?> collection, EntityBean bean, boolean withCheck)
Description copied from interface:BeanCollectionHelp
Add a bean to the List Set or Map.- Specified by:
add
in interfaceBeanCollectionHelp<T>
- Specified by:
add
in interfaceCQueryCollectionAdd<T>
-
createReference
public BeanCollection<T> createReference(EntityBean parentBean)
Description copied from interface:BeanCollectionHelp
Create a lazy loading proxy for a List Set or Map.
-
refresh
public void refresh(SpiEbeanServer server, Query<?> query, Transaction t, EntityBean parentBean)
Description copied from interface:BeanCollectionHelp
Refresh the List Set or Map.
-
refresh
public void refresh(BeanCollection<?> bc, EntityBean parentBean)
Description copied from interface:BeanCollectionHelp
Apply the new refreshed BeanCollection to the appropriate property of the parent bean.
-
jsonWrite
public void jsonWrite(SpiJsonWriter ctx, String name, Object collection, boolean explicitInclude) throws IOException
Description copied from interface:BeanCollectionHelp
Write the collection out as json.- Throws:
IOException
-
setLoader
public void setLoader(BeanCollectionLoader loader)
Description copied from interface:BeanCollectionHelp
Set the EbeanServer that owns the configuration.- Specified by:
setLoader
in interfaceBeanCollectionHelp<T>
-
underlying
public Collection underlying(Object value)
Description copied from interface:BeanCollectionHelp
Return the underlying collection of beans.- Specified by:
underlying
in interfaceBeanCollectionHelp<T>
-
-