Creates a ViewQuery pre-configured with correct dbPath, design document id and view name.
@param viewName
@return
517794
protected ViewQuery createQuery(String viewName) {
		return new ViewQuery()
				.dbPath(db.path())
				.designDocId(stdDesignDocumentId)
				.viewName(viewName);
	}
1132376
protected SqlDesc createSqlDesc(EntityDesc entityDesc, String fileName, String templateName) {
    SqlDesc sqlFileDesc = new SqlDesc();
    sqlFileDesc.setFileName(fileName);
    sqlFileDesc.setTemplateName(templateName);
    sqlFileDesc.setEntityDesc(entityDesc);
    sqlFileDesc.setDialect(dialect);
    return sqlFileDesc;
  }
303706
@NonNull
  public static Drop dropMaterializedView(@Nullable String keyspace, @NonNull String viewName) {
    return dropMaterializedView(
        keyspace == null ? null : CqlIdentifier.fromCql(keyspace), CqlIdentifier.fromCql(viewName));
  }
1232479
public List<CmsExplorerTypeSettings> getExplorerTypesForView(String viewName) {

        List<CmsExplorerTypeSettings> result = Lists.newArrayList();
        for (CmsExplorerTypeSettings explorerType : getExplorerTypeSettings()) {

            String currentViewName = explorerType.getElementView();
            if (currentViewName == null) {
                currentViewName = getDefaultView(explorerType.getName());
            }
            if ((currentViewName != null) && currentViewName.equals(viewName)) {
                if (OpenCms.getResourceManager().hasResourceType(explorerType.getName())) {
                    result.add(explorerType);
                }
            } else if (CmsResourceTypeFolder.getStaticTypeName().equals(explorerType.getName())
                && "view_folders|view_basic".contains(viewName)) {
                result.add(explorerType);
            }

        }
        return result;
    }
1239629
private function getViewStructureTable($viewName)
    {
        if (!$this->dumpSettings['skip-comments']) {
            $ret = "--".PHP_EOL.
                "-- Stand-In structure for view `${viewName}`".PHP_EOL.
                "--".PHP_EOL.PHP_EOL;
            $this->compressManager->write($ret);
        }
        $stmt = $this->typeAdapter->show_create_view($viewName);

        // create views as tables, to resolve dependencies
        foreach ($this->dbHandler->query($stmt) as $r) {
            if ($this->dumpSettings['add-drop-table']) {
                $this->compressManager->write(
                    $this->typeAdapter->drop_view($viewName)
                );
            }

            $this->compressManager->write(
                $this->createStandInTable($viewName)
            );
            break;
        }
    }
437147
@Override
    public final Query createNamedQuery(String name)
    {
        checkClosed();
        checkTransactionNeeded();
        return getPersistenceDelegator().createQuery(name);
    }
241390
@Override
    public View resolveViewName(String viewName, Locale locale) {
        if (viewName == null) {
            throw new IllegalArgumentException("Method argument viewName must not be null.");
        }

        if (viewName.startsWith(REDIRECT_URL_PREFIX)) {
            String redirectUrl = viewName.substring(REDIRECT_URL_PREFIX.length());
            return new SlingRedirectView(redirectUrl, true, true);
        }

        if (viewName.startsWith(FORWARD_URL_PREFIX)) {
            String forwardUrl = viewName.substring(FORWARD_URL_PREFIX.length());
            return new InternalResourceView(forwardUrl);
        }

        return resolveScriptingView(viewName);
    }
1050297
public String getNoSuffixViewURI(String controllerName, String viewName) {
        FastStringWriter buf = new FastStringWriter();

        return getViewURIInternal(controllerName, viewName, buf, false);
    }
1353541
@NonNull
  public static AlterMaterializedViewStart alterMaterializedView(
      @Nullable String keyspace, @NonNull String viewName) {
    return alterMaterializedView(
        keyspace == null ? null : CqlIdentifier.fromCql(keyspace), CqlIdentifier.fromCql(viewName));
  }
721006
private void createViewForSelectAll(TableInfo tableInfo, Map<String, MapReduce> views)
    {
        MapReduce mapr = new MapReduce();
        mapr.setMap("function(doc){if(doc." + tableInfo.getIdColumnName() + "){emit(null, doc);}}");
        views.put("all", mapr);
    }
1048402
@NonNull protected View createLoadingView(View view) {
    return view.findViewById(R.id.loadingView);
  }
117165
public JenkinsServer createView(FolderJob folder, String viewName, String viewXml) throws IOException {
        return createView(folder, viewName, viewXml, false);
    }
947468
private int getViewID() {
        if (viewID < 0) {
            String sql = "SELECT view_id FROM views WHERE name=?";
            String[] args = {name};
            Cursor cursor = null;
            try {
                cursor = store.getStorageEngine().rawQuery(sql, args);
                if (cursor.moveToNext()) {
                    viewID = cursor.getInt(0);
                }
            } catch (SQLException e) {
                Log.e(Log.TAG_VIEW, "Error getting view id", e);
            } finally {
                if (cursor != null) {
                    cursor.close();
                }
            }
        }
        return viewID;
    }
1115283
@SuppressWarnings("unchecked")
    public static <T extends View> T get(View view, int id) {
        SparseArray<View> viewHolder = (SparseArray<View>) view.getTag();
        if (viewHolder == null) {
            viewHolder = new SparseArray<View>();
            view.setTag(viewHolder);
        }
        View childView = viewHolder.get(id);
        if (childView == null) {
            childView = view.findViewById(id);
            viewHolder.put(id, childView);
        }
        return (T) childView;
    }
1367126
@SuppressWarnings("unchecked")
  public static <T extends View> T findViewById(View containerView, int viewId) {
    View foundView = containerView.findViewById(viewId);
    return (T) foundView;
  }
1064125
public String getDeployedAbsoluteViewURI(String viewName) {
        FastStringWriter buf = new FastStringWriter(PATH_TO_VIEWS);
        return getAbsoluteViewURIInternal(viewName, buf, true);
    }
51644
function(id) {

		if (Lava.schema.DEBUG && !id) Lava.t();

		return Lava.view_manager.getViewById(id);

	}