Create lazy query container for DS type.

@param queryFactory
@return LazyQueryContainer
962999
public static LazyQueryContainer createDSLazyQueryContainer(
            final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
        queryFactory.setQueryConfiguration(Collections.emptyMap());
        return new LazyQueryContainer(new LazyQueryDefinition(true, 20, "tagIdName"), queryFactory);
    }
974350
protected AbstractQueryImpl createQueryInstance() throws RepositoryException
   {
      try
      {
         String queryImplClassName = handler.getQueryClass();
         Object obj = ClassLoading.forName(queryImplClassName, this).newInstance();
         if (obj instanceof AbstractQueryImpl)
         {
            return (AbstractQueryImpl)obj;
         }
         else
         {
            throw new IllegalArgumentException(queryImplClassName + " is not of type "
               + AbstractQueryImpl.class.getName());
         }
      }
      catch (Throwable t) //NOSONAR
      {
         throw new RepositoryException("Unable to create query: " + t.toString(), t);
      }
   }
934515
public static QueryBuilder byInstance(Object instance){
        Validate.argumentsAreNotNull(instance);
        return new QueryBuilder(new InstanceFilterDefinition(instance));
    }
879139
protected final <T> TypedQuery<T> createCachedQuery(CriteriaQuery<T> criteriaQuery) {
        final TypedQuery<T> query = this.getEntityManager().createQuery(criteriaQuery);
        final String cacheRegion = getCacheRegionName(criteriaQuery);
        query.setHint("org.hibernate.cacheable", true);
        query.setHint("org.hibernate.cacheRegion", cacheRegion);
        return query;
    }
646750
protected <T, K extends Serializable>
    Query<T> _buildQuery(
                    final DAO<T, K>  dao,
                    final Class<T> type,
                    final QueryParams params
                    )
    {
        Query<T>  query = null;
        try {
            query = dao.createQuery();
            QueryBuilder  builder = _getQueryBuilderFactory().newBuilder( type );
            query = builder.build( query, params );
        } catch (RepositoryConfigurationException ex) {
            throw ex;
        } catch (QueryException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new QueryException( ex );
        }

        return query;
    }
809713
private <T, Y> TypedQuery<T> createTypedQueryIn(Class<T> entityCls,
            SingularAttribute<T, Y> attribute, List<Y> values) {
        EntityManager entityManager = this.entityManagerProvider.get();
        CriteriaBuilder builder = entityManager.getCriteriaBuilder();
        CriteriaQuery<T> criteriaQuery = builder.createQuery(entityCls);
        Root<T> root = criteriaQuery.from(entityCls);
        Path<Y> path = root.get(attribute);
        CriteriaBuilder.In<Y> in = builder.in(path);
        if (values != null) {
            for (Y val : values) {
                in.value(val);
            }
        }
        return entityManager.createQuery(criteriaQuery.where(in));
    }
1195538
@SuppressWarnings("rawtypes")
  @Override
  public EntityManagerFactory createEntityManagerFactory(String emName, Map properties) {
    PersistenceUnitInfo pUnit = new CadmiumPersistenceUnitInfo() ;
    return createContainerEntityManagerFactory(pUnit, properties);
  }
1188195
public static DSFactory create(Setting setting) {
		final DSFactory dsFactory = doCreate(setting);
		log.debug("Use [{}] DataSource As Default", dsFactory.dataSourceName);
		return dsFactory;
	}
778961
public Datatype.Builder setNullableBuilderFactory(BuilderFactory builderFactory) {
    if (builderFactory != null) {
      return setBuilderFactory(builderFactory);
    } else {
      return clearBuilderFactory();
    }
  }
1255819
@Override
    public <T> TypedQuery<T> createQuery(CriteriaQuery<T> paramCriteriaQuery)
    {
        checkClosed();

        return this.createQuery(CriteriaQueryTranslator.translate(paramCriteriaQuery),
                paramCriteriaQuery.getResultType());
    }
43743
@Override
	public <T> QueryRequest<List<T>> query(String fql, Class<T> type) {
		return this.query(fql, mapper.getTypeFactory().constructCollectionType(ArrayList.class, type));
	}
42100
public static LazyProxyFactory createDefaultProxyFactory() {
        if (testDependencyFullFilled()) {
            final String factoryClassName = "dev.morphia.mapping.lazy.CGLibLazyProxyFactory";
            try {
                return (LazyProxyFactory) Class.forName(factoryClassName).newInstance();
            } catch (Exception e) {
                LOG.error("While instantiating " + factoryClassName, e);
            }
        }
        return null;
    }
700823
private <T> Query<T> newQuery(final Class<T> type, final DBCollection collection, final DBObject query) {
        return getQueryFactory().createQuery(this, collection, type, query);
    }
794439
static public ContentHandleFactory newFactory(Class<?>... pojoClasses) {
    if (pojoClasses == null || pojoClasses.length == 0) return null;
    return new JacksonDatabindHandleFactory(pojoClasses);
  }
119042
public final SrvSqlEscape lazyGetSrvSqlEscape() throws Exception {
    String beanName = getSrvSqlEscapeName();
    SrvSqlEscape srvSqlEscape = (SrvSqlEscape) this.beansMap.get(beanName);
    if (srvSqlEscape == null) {
      srvSqlEscape = new SrvSqlEscape();
      this.beansMap.put(beanName, srvSqlEscape);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return srvSqlEscape;
  }
111281
public Iterable<DFactory> queryByCreatedDate(java.util.Date createdDate) {
    return queryByField(null, DFactoryMapper.Field.CREATEDDATE.getFieldName(), createdDate);
  }
1191206
public static DependencyQueryBuilder create(DependencyQuery query)
   {
      DependencyQueryBuilder builder = new DependencyQueryBuilder();
      builder.setCoordinate(query.getCoordinate());
      builder.setFilter(query.getDependencyFilter());
      builder.setRepositories(query.getDependencyRepositories());
      builder.setScopeType(query.getScopeType());
      return builder;
   }