/** * INTERNAL: * Add element to container. * This is used to add to a collection independent of type. * The session may be required to wrap for the wrapper policy. * Return whether the container changed. */ public boolean addInto(Object key, Object element, Object container, AbstractSession session) { throw QueryException.cannotAddToContainer(element, container, this); }
/** * INTERNAL: * Add element to container however that needs to be done for the type of container. * Valid for some subclasses only. * Return whether the container changed. */ protected boolean addInto(Object key, Object element, Object container) { throw QueryException.cannotAddToContainer(element, container, this); }
/** * INTERNAL: * Add element to container. * This is used to add to a collection independent of type. * The session may be required to wrap for the wrapper policy. * Return whether the container changed. */ public boolean addInto(Object key, Object element, Object container, AbstractSession session) { throw QueryException.cannotAddToContainer(element, container, this); }
/** * INTERNAL: * Add element into container which implements the Map interface. * The may be used by merging/cloning passing a Map.Entry. */ @Override public boolean addInto(Object element, Object container, AbstractSession session) { if (element instanceof Map.Entry) { Map.Entry record = (Map.Entry)element; Object key = record.getKey(); Object value = record.getValue(); return addInto(key, value, container, session); } throw QueryException.cannotAddToContainer(element, container, this); }
/** * INTERNAL: * Add element into container which implements the Map interface. * The may be used by merging/cloning passing a Map.Entry. */ @Override public boolean addInto(Object element, Object container, AbstractSession session) { if (element instanceof Map.Entry) { Map.Entry record = (Map.Entry)element; Object key = record.getKey(); Object value = record.getValue(); return addInto(key, value, container, session); } throw QueryException.cannotAddToContainer(element, container, this); }