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 Details

    • 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 interface CQueryCollectionAdd<T>
    • createEmpty

      BeanCollection<T> createEmpty(EntityBean bean)
      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

      void add(BeanCollection<?> collection, EntityBean bean, boolean withCheck)
      Add a bean to the List Set or Map.
      Specified by:
      add in interface CQueryCollectionAdd<T>
    • createReference

      BeanCollection<T> createReference(EntityBean parentBean)
      Create a lazy loading proxy for a 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