Retrieve all References (also Collection-attributes) of a given instance.
Loading is forced, even if the collection- and reference-descriptors differ.
@param pInstance the persistent instance to work with
761869
public void retrieveAllReferences(Object pInstance) throws PersistenceBrokerException
    {
        if (logger.isDebugEnabled())
        {
        	logger.debug("Manually retrieving all references for object " + serviceIdentity().buildIdentity(pInstance));
        }
        ClassDescriptor cld = getClassDescriptor(pInstance.getClass());
        getInternalCache().enableMaterializationCache();
        // to avoid problems with circular references, locally cache the current object instance
        Identity oid = serviceIdentity().buildIdentity(pInstance);
//        boolean needLocalRemove = false;
        if(getInternalCache().doLocalLookup(oid) == null)
        {
            getInternalCache().doInternalCache(oid, pInstance, MaterializationCache.TYPE_TEMP);
//            needLocalRemove = true;
        }
        try
        {
            referencesBroker.retrieveReferences(pInstance, cld, true);
            referencesBroker.retrieveCollections(pInstance, cld, true);
// arminw: should no longer needed since we use TYPE_TEMP for this kind of objects
//            // do locally remove the object to avoid problems with object state detection (insert/update),
//            // because objects found in the cache detected as 'old' means 'update'
//            if(needLocalRemove) getInternalCache().doLocalRemove(oid);
            getInternalCache().disableMaterializationCache();
        }
        catch(RuntimeException e)
        {
            getInternalCache().doLocalClear();
            throw e;
        }
    }
995927
public Collection<String> getAllInstanceDataSourceNames() {
        Collection<String> result = new LinkedList<>();
        for (Entry<String, DataSourceMetaData> entry : dataSourceMetaDataMap.entrySet()) {
            if (!isExisted(entry.getKey(), result)) {
                result.add(entry.getKey());
            }
        }
        return result;
    }
286409
def endpoint_class(collection):
    
    with app.app_context():
        try:
            cls = current_app.class_references[collection]
        except KeyError:
            raise InvalidAPIUsage(404)
        return cls
996996
@Override
    protected void findReferencedClassNames(final Set<String> classNames) {
        final MethodTypeSignature methodSig = getTypeSignature();
        if (methodSig != null) {
            methodSig.findReferencedClassNames(classNames);
        }
        final MethodTypeSignature methodDesc = getTypeDescriptor();
        if (methodDesc != null) {
            methodDesc.findReferencedClassNames(classNames);
        }
        if (annotationInfo != null) {
            for (final AnnotationInfo ai : annotationInfo) {
                ai.findReferencedClassNames(classNames);
            }
        }
        for (final MethodParameterInfo mpi : getParameterInfo()) {
            final AnnotationInfo[] aiArr = mpi.annotationInfo;
            if (aiArr != null) {
                for (final AnnotationInfo ai : aiArr) {
                    ai.findReferencedClassNames(classNames);
                }
            }
        }
    }
1152233
@Override
    public Object getObjectInstance(Object refObj, Name name, Context nameCtx, Hashtable env) throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "getObjectInstance", "" + name);
        }

        ExtendedJTATransaction extJTATran = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "class name: " + (refObj instanceof Reference ? ((Reference) refObj).getClassName() : null));
        }

        extJTATran = refObj instanceof Reference && ((Reference) refObj).getFactoryClassName() == null ? createExtendedJTATransaction() : null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "getObjectInstance: " + extJTATran);
        }

        return extJTATran;
    }
406464
@SuppressWarnings({"WeakerAccess", "unused", "SameParameterValue"}) // For library users
    @Nullable
    public List<String> getFacetRefinements(@NonNull String attribute) {
        return refinementMap.get(attribute);
    }
1087149
static TokenLifeCycleManager getInstance(final String iamEndpoint,
            final String apiKey) {
        if (iamEndpoint == null || iamEndpoint.isEmpty()) {
            throw new IllegalArgumentException(
                    "Cannot initialize with null or empty IAM endpoint.");
        }
        if (apiKey == null || apiKey.isEmpty()) {
            throw new IllegalArgumentException(
                    "Cannot initialize with null or empty IAM apiKey.");
        }
        return getInstanceUnchecked(iamEndpoint, apiKey);
    }
878009
private void storeCollections(Object obj, ClassDescriptor cld, boolean insert) throws PersistenceBrokerException
    {
        // get all members of obj that are collections and store all their elements
        Collection listCods = cld.getCollectionDescriptors();
        // return if nothing to do
        if (listCods.size() == 0)
        {
            return;
        }
        Iterator i = listCods.iterator();
        while (i.hasNext())
        {
            CollectionDescriptor cod = (CollectionDescriptor) i.next();

            // if CASCADE_NONE was set, do nothing with referenced objects
            if (cod.getCascadingStore() != ObjectReferenceDescriptor.CASCADE_NONE)
            {
                Object referencedObjects = cod.getPersistentField().get(obj);
                if (cod.isMtoNRelation())
                {
                    storeAndLinkMtoN(false, obj, cod, referencedObjects, insert);
                }
                else
                {
                    storeAndLinkOneToMany(false, obj, cod, referencedObjects, insert);
                }

                // BRJ: only when auto-update = object (CASCADE_OBJECT)
                //
                if ((cod.getCascadingStore() == ObjectReferenceDescriptor.CASCADE_OBJECT)
                        && (referencedObjects instanceof ManageableCollection))
                {
                    ((ManageableCollection) referencedObjects).afterStore(this);
                }
            }
        }
    }
1179153
def all_other_pins(id = nil, _options = {}, &_block)
      if id
        pin = Origen.pin_bank.find(id, ignore_context: true, other_pin: true)
      else
        Origen.pin_bank.all_other_pins
      end
    end
350176
@Override
	public LinkedHashMap<String, ArrayList<DBReferenceInfo>> getDatabaseReferences()  {
		LinkedHashMap<String, ArrayList<DBReferenceInfo>> databaseReferencesHashMap = new LinkedHashMap<String, ArrayList<DBReferenceInfo>>();
		if (uniprotDoc == null) {
			return databaseReferencesHashMap;
		}

		try {
			Element uniprotElement = uniprotDoc.getDocumentElement();
			Element entryElement = XMLHelper.selectSingleElement(uniprotElement, "entry");
			ArrayList<Element> dbreferenceElementList = XMLHelper.selectElements(entryElement, "dbReference");
			for (Element element : dbreferenceElementList) {
				String type = element.getAttribute("type");
				String id = element.getAttribute("id");
				ArrayList<DBReferenceInfo> idlist = databaseReferencesHashMap.get(type);
				if (idlist == null) {
					idlist = new ArrayList<DBReferenceInfo>();
					databaseReferencesHashMap.put(type, idlist);
				}
				DBReferenceInfo dbreferenceInfo = new DBReferenceInfo(type, id);
				ArrayList<Element> propertyElementList = XMLHelper.selectElements(element, "property");
				for (Element propertyElement : propertyElementList) {
					String propertyType = propertyElement.getAttribute("type");
					String propertyValue = propertyElement.getAttribute("value");
					dbreferenceInfo.addProperty(propertyType, propertyValue);
				}

				idlist.add(dbreferenceInfo);
			}
		} catch (XPathExpressionException e) {
			logger.error("Problems while parsing db references in UniProt XML: {}. No db references will be available.",e.getMessage());
			return new LinkedHashMap<String, ArrayList<DBReferenceInfo>>();
		}

		return databaseReferencesHashMap;
	}
40075
def get_reference(self, refobj):
        
        c = cmds.listConnections("%s.referencenode" % refobj, d=False)
        return c[0] if c else None
952819
public String getCollectionInterfaceType(Reference ref) {
		String collectionType = getRefCollectionType(ref);
		return getCollectionInterfaceType(collectionType);
	}
833617
public void addInstance(IReferenceableInstance instance) throws AtlasException {

        ClassType classType = typeSystem.getDataType(ClassType.class, instance.getTypeName());
        ITypedReferenceableInstance newInstance = classType.convert(instance, Multiplicity.REQUIRED);
        findReferencedInstancesToPreLoad(newInstance);
        Id id = instance.getId();
        if(mapper.lookupVertex(id) == null) {
            if(id.isAssigned()) {
                guidsToLookup.add(id);
            }
            else {
                addToClassMap(classType, instance);
            }
        }
    }
47722
def get_referenced_object(self):
        

        if self._Payment is not None:
            return self._Payment

        if self._PaymentBatch is not None:
            return self._PaymentBatch

        raise exception.BunqException(self._ERROR_NULL_FIELDS)
417454
def referencesGenerator(self, request):
        
        referenceSet = self.getDataRepository().getReferenceSet(
            request.reference_set_id)
        results = []
        for obj in referenceSet.getReferences():
            include = True
            if request.md5checksum:
                if request.md5checksum != obj.getMd5Checksum():
                    include = False
            if request.accession:
                if request.accession not in obj.getSourceAccessions():
                    include = False
            if include:
                results.append(obj)
        return self._objectListGenerator(request, results)
364707
public static Vector<Object> toXmlRpcReferencesParameters(Collection<Reference> references)
    { 
        Vector<Object> referencesParams = new Vector<Object>();        
        for(Reference reference : references)
        {
            referencesParams.add(reference.marshallize());
        }
        
        return referencesParams;
    }
728291
@Override
    void findReferencedClassNames(final Set<String> referencedClassNames) {
        if (enumValue != null) {
            enumValue.findReferencedClassNames(referencedClassNames);
        } else if (classRef != null) {
            referencedClassNames.add(classRef.getClassName());
        } else if (annotationInfo != null) {
            annotationInfo.findReferencedClassNames(referencedClassNames);
        } else if (objectArrayValue != null) {
            for (final ObjectTypedValueWrapper item : objectArrayValue) {
                item.findReferencedClassNames(referencedClassNames);
            }
        }
    }