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

    Modifier and Type
    Method
    Description
    void
    add(io.ebean.bean.BeanCollection<?> collection, io.ebean.bean.EntityBean bean, boolean withCheck)
    Add a bean to the List Set or Map.
    io.ebean.bean.BeanCollection<T>
    createEmpty(io.ebean.bean.EntityBean bean)
    Create an empty collection of the correct type.
    io.ebean.bean.BeanCollection<T>
    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.
    io.ebean.bean.BeanCollection<T>
    createReference(io.ebean.bean.EntityBean parentBean)
    Create a lazy loading proxy for a List Set or Map.
    io.ebean.bean.BeanCollectionAdd
    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(io.ebean.bean.BeanCollection<?> bc, io.ebean.bean.EntityBean parentBean)
    Apply the new refreshed BeanCollection to the appropriate property of the parent bean.
    void
    setLoader(io.ebean.bean.BeanCollectionLoader loader)
    Set the EbeanServer that owns the configuration.
    Return the underlying collection of beans.
  • Method Details

    • setLoader

      void setLoader(io.ebean.bean.BeanCollectionLoader loader)
      Set the EbeanServer that owns the configuration.
    • underlying

      Collection underlying(Object value)
      Return the underlying collection of beans.
    • getBeanCollectionAdd

      io.ebean.bean.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

      io.ebean.bean.BeanCollection<T> createEmptyNoParent()
      Create an empty collection of the correct type without a parent bean.
      Specified by:
      createEmptyNoParent in interface CQueryCollectionAdd<T>
    • createEmpty

      io.ebean.bean.BeanCollection<T> createEmpty(io.ebean.bean.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(io.ebean.bean.BeanCollection<?> collection, io.ebean.bean.EntityBean bean, boolean withCheck)
      Add a bean to the List Set or Map.
      Specified by:
      add in interface CQueryCollectionAdd<T>
    • createReference

      io.ebean.bean.BeanCollection<T> createReference(io.ebean.bean.EntityBean parentBean)
      Create a lazy loading proxy for a List Set or Map.
    • refresh

      void refresh(io.ebean.bean.BeanCollection<?> bc, io.ebean.bean.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