Search in sources :

Example 1 with MapHandler

use of org.datanucleus.store.types.containers.MapHandler in project datanucleus-core by datanucleus.

the class L2CachePopulateFieldManager method processContainer.

private void processContainer(int fieldNumber, Object container, AbstractMemberMetaData mmd) {
    Object unwrappedContainer = container;
    if (container instanceof SCOContainer) {
        if (!((SCOContainer) container).isLoaded()) {
            // Contents not loaded so just mark as unloaded
            cachedPC.setLoadedField(fieldNumber, false);
            return;
        }
        unwrappedContainer = ((SCO) container).getValue();
    }
    TypeManager typeManager = op.getExecutionContext().getTypeManager();
    if (mmd.hasMap()) {
        MapHandler mapHandler = typeManager.getContainerHandler(mmd.getType());
        processMapContainer(fieldNumber, unwrappedContainer, mmd, mapHandler);
    } else {
        ElementContainerHandler elementContainerHandler = typeManager.getContainerHandler(mmd.getType());
        processElementContainer(fieldNumber, unwrappedContainer, mmd, elementContainerHandler);
    }
}
Also used : SCOContainer(org.datanucleus.store.types.SCOContainer) MapHandler(org.datanucleus.store.types.containers.MapHandler) TypeManager(org.datanucleus.store.types.TypeManager) ElementContainerHandler(org.datanucleus.store.types.ElementContainerHandler)

Aggregations

ElementContainerHandler (org.datanucleus.store.types.ElementContainerHandler)1 SCOContainer (org.datanucleus.store.types.SCOContainer)1 TypeManager (org.datanucleus.store.types.TypeManager)1 MapHandler (org.datanucleus.store.types.containers.MapHandler)1