Return item by identifier in this transient storage then in workspace container.

@param identifier
- identifier of searched item
@param pool
- indicates does the item fall in pool
@return existed item data or null if not found
@throws RepositoryException
195374
public ItemImpl getItemByIdentifier(String identifier, boolean pool) throws RepositoryException
   {
      return getItemByIdentifier(identifier, pool, true);
   }
1204489
public function hasItem($identifier) {
        return isset($this->itemsPool[$this->prefix . '.' . $identifier]) || isset($this->itemsPool[$identifier]);
    }
899775
public <T, K extends Serializable>
    T findById(
                    final Class<T> type,
                    final K id
                    )
    {
       _LOG_.info( "findById: type=" + type + ", ID=" + id );
       long  ts_start = System.currentTimeMillis();

       T  p_object = null;
       try {
           p_object = getDAO( type ).get( id );
       } catch (Exception ex) {
           throw new RepositoryException( ex );
       }

       _LOG_.info( "findById: elapsed time (ms)=" +  (System.currentTimeMillis() - ts_start) );
       _LOG_.debug( (p_object == null ? "findById: object NOT found" : "findById: object found") );
       if (p_object == null) {
           ObjectNotFoundException  ex = new ObjectNotFoundException( "type=" + type + ", id=" + id );
           ex.setType( type );
           ex.setId( id );
           throw ex;
       }

       return p_object;
   }
473696
public function findByIdentifier($identifier)
    {
        $object = $this->persistenceManager->getObjectByIdentifier($identifier, $this->entityClassName);
        if ($object === null) {
            foreach ($this->addedResources as $addedResource) {
                if ($this->persistenceManager->getIdentifierByObject($addedResource) === $identifier) {
                    $object = $addedResource;
                    break;
                }
            }
        }

        return $object;
    }
753649
public static MockMethodDispatcher get(String identifier, Object instance) {
        if (instance == INSTANCE) {
            // Avoid endless loop if ConcurrentHashMap was redefined to check for being a mock.
            return null;
        } else {
            return INSTANCE.get(identifier);
        }
    }
708823
protected NodeImpl parent(final boolean pool) throws RepositoryException
   {
      NodeImpl parent = (NodeImpl)dataManager.getItemByIdentifier(getParentIdentifier(), pool);
      if (parent == null)
      {
         throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
            + getParentIdentifier());
      }
      return parent;
   }
1340290
public synchronized ProviderLoader getLoaderForIdent(final ProviderIdent ident) throws ProviderLoaderException {
        final cacheItem cacheItem = cache.get(ident);
        if (null == cacheItem) {
            return rescanForItem(ident);
        }

        final File file = cacheItem.getFirst();
        if (cacheItem.getSecond().isExpired(ident, file)) {
            remove(ident);
            return rescanForItem(ident);
        } else {
            return loadFileProvider(cacheItem);
        }
    }
368763
public final AbstractExecutor.Get getJadeGetExecutor(Object obj, Object identifier) {
		final Class<?> claz = obj.getClass();
		final String property = toString(identifier);
		AbstractExecutor.Get executor;
		// let's see if we are a map...
		executor = new MapGetExecutor(this, claz, identifier);
		if (executor.isAlive()) {
			return executor;
		}
		// first try for a getFoo() type of property (also getfoo() )
		if (property != null) {
			executor = new PropertyGetExecutor(this, claz, property);
			if (executor.isAlive()) {
				return executor;
			}
			// }
			// look for boolean isFoo()
			// if (property != null) {
			executor = new BooleanGetExecutor(this, claz, property);
			if (executor.isAlive()) {
				return executor;
			}
		}
		// let's see if we can convert the identifier to an int,
		// if obj is an array or a list, we can still do something
		Integer index = toInteger(identifier);
		if (index != null) {
			executor = new ListGetExecutor(this, claz, index);
			if (executor.isAlive()) {
				return executor;
			}
		}
		// if that didn't work, look for set("foo")
		executor = new DuckGetExecutor(this, claz, identifier);
		if (executor.isAlive()) {
			return executor;
		}
		// if that didn't work, look for set("foo")
		executor = new DuckGetExecutor(this, claz, property);
		if (executor.isAlive()) {
			return executor;
		}
		return null;
	}
913015
public static RepositoryQuery lookupFrom(EbeanQueryMethod method, EbeanServer ebeanServer) {
        final String queryName = method.getNamedQueryName();

        LOG.debug("Looking up named query {}", queryName);

        try {
            Query query = ebeanServer.createNamedQuery(method.getEntityInformation().getJavaType(), queryName);
            return new NamedEbeanQuery(method, ebeanServer, query);
        } catch (PersistenceException e) {
            LOG.debug("Did not find named query {}", queryName);
            return null;
        }
    }
1351316
public function getItem($identifier) {
        if(!isset($this->itemsPool[$identifier]) && $this->prefix !== null) {
            return $this->itemsPool[$this->prefix . '.' . $identifier];
        }

        return $this->itemsPool[$identifier];
    }
449244
public OBinarySerializer<?> getObjectSerializer(final byte identifier) {
    OBinarySerializer<?> impl = serializerIdMap.get(identifier);
    if (impl == null) {
      final Class<? extends OBinarySerializer<?>> cls = serializerClassesIdMap.get(identifier);
      if (cls != null)
        try {
          impl = cls.newInstance();
        } catch (Exception e) {
          OLogManager.instance().error(this, "Cannot create an instance of class %s invoking the empty constructor", cls);
        }
    }
    return impl;
  }
1295747
protected ItemData getCachedCleanItemData(NodeData parentData, QPathEntry name, ItemType itemType)
      throws RepositoryException
   {
      ItemData data = getCachedItemData(parentData, name, itemType);

      if (data != null && !data.isNode() && !(data instanceof NullItemData) && forceLoad((PropertyData)data))
      {
         cache.remove(data.getIdentifier(), data);
         data = null;
      }
      return data;
   }
334918
public RepositoryLogRecord getRecord(RepositoryPointer location) {
		if (!(location instanceof RepositoryPointerImpl)) {
			return null;
		}
		RepositoryPointerImpl real = (RepositoryPointerImpl)location;
		long pos = real.getRecordOffset();
		File file = fileBrowser.findFile(real);
		if (pos < 0 || file == null) {
			return null;
		}
		OneFileRecordIterator current = new OneFileRecordIterator(file, -1, new AllAcceptVerifier());
		RepositoryLogRecord rec = null;
		if (current.setPosition(pos)) {
			rec = current.next();
		}
		current.close();
		if (rec != null && real.equals(rec.getRepositoryPointer())) {
			return rec;
		} 		
		
		return null;
		
	}
605677
public static String extractFromResourceId(String id, String identifier) {
        if (id == null || identifier == null) {
            return id;
        }
        Pattern pattern = Pattern.compile(identifier + "/[-\\w._]+");
        Matcher matcher = pattern.matcher(id);
        if (matcher.find()) {
            return matcher.group().split("/")[1];
        } else {
            return null;
        }
    }
75070
public static void assertNodeExistById(final Session session, final String itemId) throws RepositoryException {
        try {
            session.getNodeByIdentifier(itemId);
        } catch (final ItemNotFoundException e) {
            LOG.debug("Item with id {} does not exist", itemId, e);
            fail(e.getMessage());
        }
    }
176253
public static int getPositionByIdentifier(DrawerBuilder drawer, long identifier) {
        if (identifier != -1) {
            for (int i = 0; i < drawer.getAdapter().getItemCount(); i++) {
                if (drawer.getAdapter().getItem(i).getIdentifier() == identifier) {
                    return i;
                }
            }
        }

        return -1;
    }
768324
@Override
    public TemplateContentData get(String identifier) {
        Object lock = locksMap.get(identifier);
        if (lock != null) {
            synchronized (lock) {
                AccessOrderedTemplateContentData data = templateDataMap.get(identifier);
                if ((data != null) && templateOrderQueue.contains(data)) {
                    templateOrderQueue.remove(data);
                    if (isFresh(data)) {
                        TemplateContentData templateContentData = data.getTemplateContentData();
                        templateOrderQueue.offer(data);
                        return templateContentData;
                    }
                    templateDataMap.remove(identifier);
                    deductAndGet(data.getTemplateContentData().getTemplateContent().length);
                    LOGGER.warn(String.format("Template: %s is out of date, removing.", identifier));
                }
            }
        }
        return null;
    }