code: protected ItemData getItemByName(NodeData parent, String parentId, QPathEntry name, ItemType itemType)
        throws RepositoryException, IllegalStateException
     {
        checkIfOpened();
        try
        {
           ResultSet item = null;
           try
           {
              item = findItemByName(parentId, name.getAsString(), name.getIndex());
              while (item.next())
              {
                 int columnClass = item.getInt(COLUMN_CLASS);
                 if (itemType == ItemType.UNKNOWN || columnClass == itemType.ordinal())
                 {
                    return itemData(parent.getQPath(), item, columnClass, parent.getACL());
                 }
              }
  
              return null;
           }
           finally
           {
              try
              {
                 if (item != null)
                 {
                    item.close();
                 }
              }
              catch (SQLException e)
              {
                 LOG.error("Can't close the ResultSet: " + e.getMessage());
              }
           }
        }
        catch (SQLException e)
        {
           throw new RepositoryException(e);
        }
        catch (IOException e)
        {
           throw new RepositoryException(e);
        }
     }
docs: Gets an item data from database.
  
  @param parent
  - parent QPath
  @param parentId
  - parent container internal id (depends on Multi/Single DB)
  @param name
  - item name
  @param itemType
  - item type
  @return - ItemData instance
  @throws RepositoryException
  Repository error
  @throws IllegalStateException
  if connection is closed