Initialises Query object.

@param \Illuminate\Database\Eloquent\Model The model to work on
@param Class to customize query/data/logic

@return void
323157
protected function setQuery($model, $class)
    {
        $this->query = new $model();

        if (method_exists($class, 'laratablesQueryConditions')) {
            $this->query = $class::laratablesQueryConditions($this->query);
        }
    }
324865
public function addClass($class) {
        $this->setVariable(self::VIEW_MODEL_CLASS, $this->addValue($this->getVariable(self::VIEW_MODEL_CLASS), $class));
    }
798681
public function init()
    {
        parent::init();

        $this->owner->persistence_data['use_table_prefixes'] = true;

        // If kind is not specified, figure out join type
        if (!isset($this->kind)) {
            $this->kind = $this->weak ? 'left' : 'inner';
        }

        // Our short name will be unique
        if (!$this->foreign_alias) {
            $this->foreign_alias = (isset($this->owner->table_alias) ? $this->owner->table_alias : '').$this->short_name;
        }

        $this->owner->addhook('initSelectQuery', $this);

        // Add necessary hooks
        if ($this->reverse) {
            $this->owner->addHook('afterInsert', $this);
            $this->owner->addHook('beforeUpdate', $this);
            $this->owner->addHook('beforeDelete', [$this, 'doDelete'], null, -5);
            $this->owner->addHook('afterLoad', $this);
        } else {

            // Master field indicates ID of the joined item. In the past it had to be
            // defined as a physical field in the main table. Now it is a model field
            // so you can use expressions or fields inside joined entities.
            // If string specified here does not point to an existing model field
            // a new basic field is inserted and marked hidden.
            if (is_string($this->master_field)) {
                $e = $this->owner->hasField($this->master_field);
                if (!$e) {
                    if ($this->join) {
                        $e = $this->join->addField($this->master_field, ['system' => true, 'read_only' => true]);
                    } else {
                        $e = $this->owner->addField($this->master_field, ['system' => true, 'read_only' => true]);
                    }
                    $this->master_field = $e->short_name;
                }
            }

            $this->owner->addHook('beforeInsert', $this, null, -5);
            $this->owner->addHook('beforeUpdate', $this);
            $this->owner->addHook('afterDelete', [$this, 'doDelete']);
            $this->owner->addHook('afterLoad', $this);
        }
    }
1328904
private void init(){
	
		if(!Annotation.isInheritedMapped(configuredClass))
			Error.classNotMapped(configuredClass);
		
		for (Class<?> classe :getClasses()){
			relationalManyToOneMapper.put(classe.getName(), new JMapper(configuredClass, classe,ChooseConfig.DESTINATION));
			relationalOneToManyMapper.put(classe.getName(), new JMapper(classe, configuredClass,ChooseConfig.SOURCE));
		}
	}
112128
public function initialize()
    {
        parent::initialize();

        $id = str_random(10);

        $this->setHtmlAttribute('class', 'datatables');
        $this->setHtmlAttribute('data-id', $id);
        $this->getColumnFilters()->setHtmlAttribute('data-datatables-id', $id);

        $this->setHtmlAttribute('data-order', json_encode($this->getOrder()));

        $attributes = $this->getDatatableAttributes();
        $attributes['pageLength'] = $this->paginate;

        $attributes['language'] = trans('sleeping_owl::lang.table');

        foreach ($this->getColumns()->all() as $column) {
            $attributes['columns'][] = [
                'orderable' => $column->isOrderable(),
                'visible' => $column->isVisible(),
                'orderDataType' => class_basename($column),
            ];
        }

        $this->setHtmlAttribute('data-attributes', json_encode($attributes));
    }
692774
public static void initialize(final Class<?> _class)
        throws CacheReloadException
    {
        if (InfinispanCache.get().exists(Type.UUIDCACHE)) {
            InfinispanCache.get().<UUID, Type>getCache(Type.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, Type>getCache(Type.UUIDCACHE).addListener(new CacheLogListener(Type.LOG));
        }
        if (InfinispanCache.get().exists(Type.IDCACHE)) {
            InfinispanCache.get().<Long, Type>getCache(Type.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Type>getCache(Type.IDCACHE).addListener(new CacheLogListener(Type.LOG));
        }
        if (InfinispanCache.get().exists(Type.NAMECACHE)) {
            InfinispanCache.get().<String, Type>getCache(Type.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, Type>getCache(Type.NAMECACHE).addListener(new CacheLogListener(Type.LOG));
        }
        if (InfinispanCache.get().exists(EnumType.CACHE)) {
            InfinispanCache.get().getCache(EnumType.CACHE).clear();
        }
        QueryCache.initialize();
    }
694623
protected function init()
    {
        $this->query = new Query();
        $this->post = new Post();
        $this->payload = new Payload();
        $this->server = new Server();
        $this->files = new Files();
        $this->env = new Env();
        $this->headers = new Headers();
    }
364088
public function initializeSearchComponent()
    {
        if ($this->seachRequest->getContextTypoScriptConfiguration()->getEnabledDebugMode()) {
            $this->queryBuilder->startFrom($this->query)->useDebug(true);
        }
    }
1316225
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            for ($i = 0, $paramsCount = count($params); $i < $paramsCount; $i++) {
                if (self::COMMENTS_KEY === $params[$i]->getType()) {
                    $comment = new Comment();
                    $comment->setValue($params[$i]->getValue());
                    $this->_comments[] = $comment;
                }
            }
        }
    }
1318438
protected function init()
    {
        if (null === $this->items) {
            list($constraints, $sorting, $joins) = $this->translate($this->filter, $this->sorting);

            if (empty($constraints)) {
                $constraints = '';
            } else {
                $constraints = ' WHERE ' . implode(' AND ', $constraints);
            }

            if ($this->prefetch) {
                $this->initEntities($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            } else {
                $this->initKeys($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            }

            $this->rewind();
        }
    }
264172
def init(req, model):  # pylint: disable=unused-argument
    

    limit = req.get_param('page[limit]') or goldman.config.PAGE_LIMIT
    offset = req.get_param('page[offset]') or 0

    try:
        return Paginator(limit, offset)
    except ValueError:
        raise InvalidQueryParams(**{
            'detail': 'The page[\'limit\'] & page[\'offset\'] query '
                      'params may only be specified once each & must '
                      'both be an integer >= 0.',
            'links': 'jsonapi.org/format/#fetching-pagination',
            'parameter': 'page',
        })
368747
public function init() {

		parent::init();

		$cacheProperties = CacheProperties::getInstance();

		$this->cache = $cacheProperties->isCaching();

		// Init models
		$this->initModels();

		// Init Pagination
		$this->initPaging();
	}
1345805
private void init() {

		factories.put(NotEmptyQuery.class,     new NotEmptyQueryFactory(this));
		factories.put(FulltextQuery.class,     new KeywordQueryFactory(this));
		factories.put(SpatialQuery.class,      new SpatialQueryFactory(this));
		factories.put(GroupQuery.class,        new GroupQueryFactory(this));
		factories.put(RangeQuery.class,        new RangeQueryFactory(this));
		factories.put(ExactQuery.class,        new KeywordQueryFactory(this));
		factories.put(ArrayQuery.class,        new ArrayQueryFactory(this));
		factories.put(EmptyQuery.class,        new EmptyQueryFactory(this));
		factories.put(TypeQuery.class,         new TypeQueryFactory(this));
		factories.put(UuidQuery.class,         new UuidQueryFactory(this));
		factories.put(RelationshipQuery.class, new RelationshipQueryFactory(this));
		factories.put(ComparisonQuery.class,   new ComparisonQueryFactory(this));

		converters.put(Boolean.class, new BooleanTypeConverter());
		converters.put(String.class,  new StringTypeConverter());
		converters.put(Date.class,    new DateTypeConverter());
		converters.put(Long.class,    new LongTypeConverter());
		converters.put(Short.class,   new ShortTypeConverter());
		converters.put(Integer.class, new IntTypeConverter());
		converters.put(Float.class,   new FloatTypeConverter());
		converters.put(Double.class,  new DoubleTypeConverter());
		converters.put(byte.class,    new ByteTypeConverter());
	}
289324
public function initialize()
    {
        $this->where  = new WhereClause($this);
        $this->order  = new OrderClause($this);
        $this->limit  = new LimitClause($this);
        $this->joins  = new JoinClause($this);
    }
1013522
public function init() {

		parent::init();

		$this->modelService = isset( $this->modelService ) ? $this->modelService : $this->controller->modelService;
	}
847552
public function initialize()
    {
        $this->data = new stdClass();
        $this->data->holder = new stdClass();
        $this->data->holder->taxDocument = new stdClass();
    }
727030
public function initializeObject() {
    $querySettings = $this->objectManager->get(Typo3QuerySettings::class);
    $querySettings->setIgnoreEnableFields(false);
    $querySettings->setRespectStoragePage(false);

    $this->setDefaultQuerySettings($querySettings);
  }