Locate an ObjectStore used by this objectManager.

@param objectStoreName of the ObjectStore.
@return ObjectStore found matching the identifier.
@throws ObjectManagerException
495083
public final ObjectStore getObjectStore(String objectStoreName)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "getObjectStore"
                        , "objectStoreName=" + objectStoreName + "(String)"
                            );

        ObjectStore objectStore = objectManagerState.getObjectStore(objectStoreName);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "getObjectStore"
                       , "returns objectStore=" + objectStore + "(ObjectStore)"
                            );
        return objectStore;
    }
1064450
@Override
    public boolean objectExists(String pid) throws StorageDeviceException {
        boolean registered = objectExistsInRegistry(pid);
        boolean exists = false;
        if (!registered && m_checkableStore) {
            try {
                exists = ((ICheckable)m_permanentStore).objectExists(pid);
            } catch (LowlevelStorageException e) {
                throw new StorageDeviceException(e.getMessage(), e);
            }
        }
        if (exists && !registered) {
            logger.warn("{} was not in the registry, but appears to be in store." +
                        " Registry db may be in inconsistent state.", pid);
        }
        return registered || exists;
    }
1013804
@Override
    public <K, V> StoreClient<K, V> getStoreClient(final String storeName,
                                                   final InconsistencyResolver<Versioned<V>> resolver) {
        // wrap it in LazyStoreClient here so any direct calls to this method
        // returns a lazy client
        return new LazyStoreClient<K, V>(new Callable<StoreClient<K, V>>() {

            @Override
            public StoreClient<K, V> call() throws Exception {
                Store<K, V, Object> clientStore = getRawStore(storeName, resolver);
                return new RESTClient<K, V>(storeName, clientStore);
            }
        }, true);
    }
823689
public Collection storeObjects(Collection objects)
    {
        try
        {
            /* One possibility of storing objects is to use the current transaction
             associated with the container */
            Transaction tx = odmg.currentTransaction();
            for (Iterator iterator = objects.iterator(); iterator.hasNext();)
            {
                tx.lock(iterator.next(), Transaction.WRITE);
            }
        }
        catch (LockNotGrantedException e)
        {
            log.error("Failure while storing objects " + objects, e);
            throw new EJBException("Failure while storing objects", e);
        }
        return objects;
    }
1176112
final AbstractSingleFileObjectStore.Directory makeDirectory(int minimumNodeSize,
                                                                long directoryRootByteAddress,
                                                                long directoryRootLength)
                    throws ObjectManagerException {
        return new Directory(minimumNodeSize,
                             directoryRootByteAddress,
                             directoryRootLength);
    }
1225627
public Object find(Class clazz, Object identifier) {
        EntityManager entityManager = null;
        try {
            entityManager = entityManagers.poll();
            //noinspection unchecked
            return entityManager.find(clazz, identifier);
        } catch (Exception e) {
            e.printStackTrace();
        }
        finally {
            if(entityManager != null)
                entityManagers.add(entityManager);
        }

        return null;
    }
1361586
public void store(Object obj) throws PersistenceBrokerException
    {
        obj = extractObjectToStore(obj);
        // only do something if obj != null
        if(obj == null) return;

        ClassDescriptor cld = getClassDescriptor(obj.getClass());
        /*
        if one of the PK fields was null, we assume the objects
        was new and needs insert
        */
        boolean insert = serviceBrokerHelper().hasNullPKField(cld, obj);
        Identity oid = serviceIdentity().buildIdentity(cld, obj);
        /*
        if PK values are set, lookup cache or db to see whether object
        needs insert or update
        */
        if (!insert)
        {
            insert = objectCache.lookup(oid) == null
                && !serviceBrokerHelper().doesExist(cld, oid, obj);
        }
        store(obj, oid, cld, insert);
    }
534740
@Override
    public Object find(Class entityClass, Object key)
    {
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass);

        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                entityMetadata.getPersistenceUnit());

        AbstractManagedType managedType = (AbstractManagedType) metaModel.entity(entityMetadata.getEntityClazz());

        return managedType.hasLobAttribute() ? findGFSEntity(entityMetadata, entityClass, key) : find(entityClass, key,
                entityMetadata, metaModel, managedType);
    }
592909
public final AbstractItem findOldestItem() throws MessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "findOldestItem");

        AbstractItem item = _references().findOldestItem();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "findOldestItem", item);
        return item;
    }
483324
@Override
    public FileStore getFileStore(final Path path) throws IOException {
        final FileStore fileStore = path.getFileSystem().getFileStores().iterator().next();
        return fileStore;
    }
284452
protected Object resolveObject(Object objectToResolve) {
        final String methodName = "resolveObject";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName,
                        new Object[] { objectToResolve });

        Object resolvedObject; // The resolved object we will return.
        if (objectToResolve instanceof Token) {
            resolvedObject = ((Token) objectToResolve).current();
        } else {
            resolvedObject = objectToResolve;
        }

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       methodName,
                       new Object[] { resolvedObject });
        return resolvedObject;
    }
110166
public int getIdentifier()
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
        {
            trace.entry(this, cclass
                        , "getIdentifier"
                            );
            trace.exit(this, cclass
                       , "getIdentifier"
                       , "returns objectStoreIdentifier=" + objectStoreIdentifier + "(int)"
                            );
        }

        return objectStoreIdentifier;
    }
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);
                }
            }
        }
    }
1316239
private function getStore($store)
    {
        if (!is_object($store)) {
            $store = $this->storeManager->getStore($store);
        }

        return $store;
    }
521729
protected function getObjectManager(string $entityNamespace): ? ObjectManager
    {
        return $this
            ->get('base.object_manager_provider')
            ->getObjectManagerByEntityNamespace(
                $this->locateEntity($entityNamespace)
            );
    }
163639
function(storeName, transaction, cb) {
    try {
      return transaction.objectStore(storeName);
    } catch (err) {
      if (isFunction(cb)) return cb(err);
    }
  }
332253
public function getCacheKeyForObjectManagerName($objectManagerName)
    {
        if (array_key_exists($objectManagerName, $this->cacheKeys)) {
            return $this->cacheKeys[$objectManagerName];
        }

        $preffix = $this->getModuleOptions()->getEntityMapDoctrineCachePrefix();
        $key = $preffix . '_' . $objectManagerName;

        $this->cacheKeys[$objectManagerName] = $key;

        return $this->cacheKeys[$objectManagerName];
    }