Return the context result object pulled from the persistence_engine
        if it has been set.
978585
def result(self):
        
        if not self._result:
            if not self._persistence_engine:
                return None

            self._result = self._persistence_engine.get_context_result(self)

        return self._result
18019
def get_context_data(self, **kwargs):
        """"""
        kwargs.update({
            'methods': registry.get_all_methods(self.entry_point, sort_methods=True),
        })
        return super(RPCEntryPoint, self).get_context_data(**kwargs)
229456
def get(self, sid):
        
        return VariableContext(
            self._version,
            service_sid=self._solution['service_sid'],
            environment_sid=self._solution['environment_sid'],
            sid=sid,
        )
386936
def get_to_persist(persisters):
    
    def specs():
        for p in persisters:
            if isinstance(p, dict):
                yield p["name"], p.get("enabled", True)
            else:
                yield p, True

    components = sorted(dr.DELEGATES, key=dr.get_name)
    names = dict((c, dr.get_name(c)) for c in components)

    results = set()
    for p, e in specs():
        for c in components:
            if names[c].startswith(p):
                if e:
                    results.add(c)
                elif c in results:
                    results.remove(c)
    return results
887862
def process_result(self, context, result_body, exc, content_type):
        
        return process_result(self, context, result_body, exc, content_type)
1294653
def _get_context(keyspaces, connections):
    """"""

    if keyspaces:
        if not isinstance(keyspaces, (list, tuple)):
            raise ValueError('keyspaces must be a list or a tuple.')

    if connections:
        if not isinstance(connections, (list, tuple)):
            raise ValueError('connections must be a list or a tuple.')

    keyspaces = keyspaces if keyspaces else [None]
    connections = connections if connections else [None]

    return product(connections, keyspaces)
1071721
def _prepare_persistence_engine(self):
        
        if self._persistence_engine:
            return

        persistence_engine = self._options.get('persistence_engine')
        if persistence_engine:
            self._persistence_engine = path_to_reference(persistence_engine)
            return

        from furious.config import get_default_persistence_engine

        self._persistence_engine = get_default_persistence_engine()
977467
function collectionResult (results) {
    // get context by executing any pre methods on collection views
    return this.collectionResultPre()
    // apply views to each record
    .then(context => {
        // if there are no results then do nothing
        if (!Array.isArray(results) || !results.length) {
            return context
        }
        // check if full records were loaded
        return this.query.limit === 1 || this.query.all
            // apply views to results directly
            ? this.collectionResultList(context, results)
            // create result object to iterate over results
            : this.collectionResultIterator(context, results)
    })
    // apply any post methods to context and return result
    .then(context => {
        return this.collectionResultPost(context)
    })
}
39092
def ctx(self):
        '''
        
        '''
        if six.PY2:
            return contextlib.nested(
                self.functions.context_dict.clone(),
                self.returners.context_dict.clone(),
                self.executors.context_dict.clone(),
            )
        else:
            exitstack = contextlib.ExitStack()
            exitstack.enter_context(self.functions.context_dict.clone())
            exitstack.enter_context(self.returners.context_dict.clone())
            exitstack.enter_context(self.executors.context_dict.clone())
            return exitstack
497809
def get_current_context():
    
    local_context = _local.get_local_context()

    if local_context.registry:
        return local_context.registry[-1]

    raise errors.NotInContextError('Not in a Context.')
737294
def getContext(self, context_name = 'default'):
		
		if context_name == 'default' and 'default' not in self.contexts:
			self('default')

		return self.contexts[context_name]
958816
def get_context_data(self, **kwargs):
        

        context = {'obj': self.object }
        if 'queryset' in kwargs:
            context['conf_msg'] = self.get_confirmation_message(kwargs['queryset'])
        context.update(kwargs)
        return context
159895
public java.lang.Object getResultObject(ApplicationContext applicationContext) {
        if (object == null) {
            return null;
        }

        if (object.getValueObject() != null) {
            return object.getValueObject();
        }

        try {
            Class argType = Class.forName(object.getType());
            java.lang.Object value = null;

            if (object.getValue() != null) {
                value = object.getValue();
            } else if (StringUtils.hasText(object.getRef()) && applicationContext != null) {
                value = applicationContext.getBean(object.getRef());
            }

            if (value == null) {
                return null;
            } else if (argType.isInstance(value) || argType.isAssignableFrom(value.getClass())) {
                return argType.cast(value);
            } else if (Map.class.equals(argType)) {
                String mapString = value.toString();

                Properties props = new Properties();
                try {
                    props.load(new StringReader(mapString.substring(1, mapString.length() - 1).replace(", ", "\n")));
                } catch (IOException e) {
                    throw new CitrusRuntimeException("Failed to reconstruct service result object of type map", e);
                }
                Map<String, String> map = new LinkedHashMap<>();
                for (Map.Entry<java.lang.Object, java.lang.Object> entry : props.entrySet()) {
                    map.put(entry.getKey().toString(), entry.getValue().toString());
                }

                return map;
            } else {
                try {
                    return new SimpleTypeConverter().convertIfNecessary(value, argType);
                } catch (ConversionNotSupportedException e) {
                    if (String.class.equals(argType)) {
                        return value.toString();
                    }

                    throw e;
                }
            }
        } catch (ClassNotFoundException e) {
            throw new CitrusRuntimeException("Failed to construct service result object", e);
        }
    }
353697
def getContext(self):
        """"""
        ctx = ClientContextFactory.getContext(self)
        ctx.set_options(OP_NO_SSLv3)
        return ctx
962393
def get_context(method):
    
    if Context.exists(method):
        return Context.increment(method)
    else:
        return Context(method)
451777
private void loadFromResultSet(
		final Tuple resultset,
		final int i,
		final Object object,
		final String instanceEntityName,
		final org.hibernate.engine.spi.EntityKey key,
		final String rowIdAlias,
		final LockMode lockMode,
		final Loadable rootPersister,
		final SharedSessionContractImplementor session)
	throws HibernateException {

		final Serializable id = key.getIdentifier();

		// Get the persister for the _subclass_
		final OgmEntityPersister persister = (OgmEntityPersister) getFactory().getMetamodel().entityPersister( instanceEntityName );

		if ( log.isTraceEnabled() ) {
			log.trace(
					"Initializing object from ResultSet: " +
					MessageHelper.infoString( persister, id, getFactory() )
				);
		}

		//FIXME figure out what that means and what value should be set
		//boolean eagerPropertyFetch = isEagerPropertyFetchEnabled(i);
		boolean fetchAllPropertiesRequested = true;

		// add temp entry so that the next step is circular-reference
		// safe - only needed because some types don't take proper
		// advantage of two-phase-load (esp. components)
		TwoPhaseLoad.addUninitializedEntity(
				key,
				object,
				persister,
				lockMode,
				session
		);

		//TODO what to do with that in OGM
//		//This is not very nice (and quite slow):
//		final String[][] cols = persister == rootPersister ?
//				getEntityAliases()[i].getSuffixedPropertyAliases() :
//				getEntityAliases()[i].getSuffixedPropertyAliases(persister);

		final Object[] values = persister.hydrate(
				resultset,
				id,
				object,
				rootPersister,
				//cols,
				fetchAllPropertiesRequested,
				session
			);

		if ( persister.hasRowId() ) {
			throw new HibernateException( "Hibernate OGM does not support row id" );
		}
		final Object rowId = null;

		final AssociationType[] ownerAssociationTypes = getOwnerAssociationTypes();
		if ( ownerAssociationTypes != null && ownerAssociationTypes[i] != null ) {
			String ukName = ownerAssociationTypes[i].getRHSUniqueKeyPropertyName();
			if ( ukName != null ) {
				final int index = ( (UniqueKeyLoadable) persister ).getPropertyIndex( ukName );
				final Type type = persister.getPropertyTypes()[index];

				// polymorphism not really handled completely correctly,
				// perhaps...well, actually its ok, assuming that the
				// entity name used in the lookup is the same as the
				// the one used here, which it will be

				EntityUniqueKey euk = new EntityUniqueKey(
						rootPersister.getEntityName(), //polymorphism comment above
						ukName,
						type.semiResolve( values[index], session, object ),
						type,
						persister.getEntityMode(),
						session.getFactory()
					);
				session.getPersistenceContext().addEntity( euk, object );
			}
		}

		TwoPhaseLoad.postHydrate(
				persister,
				id,
				values,
				rowId,
				object,
				lockMode,
				session
			);

		OgmEntityEntryState.getStateFor( session, object ).getTuplePointer().setTuple( resultset );
	}
275614
def load(cls, context_id, persistence_engine=None):
        """"""
        if not persistence_engine:
            from furious.config import get_default_persistence_engine
            persistence_engine = get_default_persistence_engine()

        if not persistence_engine:
            raise RuntimeError(
                'Specify a valid persistence_engine to load the context.')

        return persistence_engine.load_context(context_id)