Platform Explorer / Nuxeo Platform 5.6

Contribution org.nuxeo.ecm.webapp.querymodel.DefaultQueryModels--model

This contribution is part of XML component org.nuxeo.ecm.webapp.querymodel.DefaultQueryModels inside nuxeo-platform-webapp-core-5.6.jar

Extension point

Extension point model of component QueryModelService.

Contributed items

  • <queryModel name="CURRENT_DOC_CHILDREN">
          <pattern>
            SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isCheckedInVersion
            = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
            ecm:currentLifeCycleState != 'deleted'
          </pattern>
          <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
          <max>20</max>
        </queryModel>
  • <queryModel name="CURRENT_DOC_DELETED_CHILDREN">
          <pattern>
            SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isCheckedInVersion
            = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
            ecm:currentLifeCycleState = 'deleted'
          </pattern>
          <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
          <max>20</max>
        </queryModel>
  • <queryModel name="CURRENT_DOC_ORDERED_CHILDREN">
          <pattern>
            SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isCheckedInVersion
            = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
            ecm:currentLifeCycleState != 'deleted' ORDER BY ecm:pos
          </pattern>
          <sortable value="false"/>
          <max>20</max>
        </queryModel>
  • <queryModel name="TREE_CHILDREN">
          <pattern>
            SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
            ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
            AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
            'deleted'
          </pattern>
          <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
          <max>50</max>
        </queryModel>
  • <queryModel name="TREE_ORDERED_CHILDREN">
          <pattern>
            SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
            ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
            AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
            'deleted' ORDER BY ecm:pos
          </pattern>
          <sortable value="false"/>
          <max>50</max>
        </queryModel>
  • <queryModel name="SIMPLE_SEARCH">
          <pattern>
            SELECT * FROM Document WHERE ecm:fulltext LIKE ? AND ecm:mixinType !=
            'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND
            ecm:currentLifeCycleState != 'deleted'
          </pattern>
          <max>20</max>
          <sortable value="true"/>
        </queryModel>
  • <queryModel docType="AdvancedSearch" name="ADVANCED_SEARCH">
          <max>20</max>
          <whereClause>
    
            <predicate operator="FULLTEXT" parameter="ecm:fulltext">
              <field name="fulltext_all" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="=" parameter="ecm:isCheckedInVersion">
              <field name="isCheckedInVersion" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="STARTSWITH" parameter="ecm:path">
              <field name="searchpath" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="FULLTEXT" parameter="dc:title">
              <field name="title" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="FULLTEXT" parameter="dc:description">
              <field name="description" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="LIKE" parameter="dc:rights">
              <field name="rights" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="LIKE" parameter="dc:source">
              <field name="source" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="IN" parameter="dc:coverage">
              <field name="coverage" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="IN" parameter="dc:subjects">
              <field name="subjects" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="BETWEEN" parameter="dc:created">
              <field name="created_min" schema="advanced_search"/>
              <field name="created_max" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="BETWEEN" parameter="dc:modified">
              <field name="modified_min" schema="advanced_search"/>
              <field name="modified_max" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="BETWEEN" parameter="dc:issued">
              <field name="issued_min" schema="advanced_search"/>
              <field name="issued_max" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="BETWEEN" parameter="dc:valid">
              <field name="valid_min" schema="advanced_search"/>
              <field name="valid_max" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="BETWEEN" parameter="dc:expired">
              <field name="expired_min" schema="advanced_search"/>
              <field name="expired_max" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="LIKE" parameter="dc:format">
              <field name="format" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="LIKE" parameter="dc:language">
              <field name="language" schema="advanced_search"/>
            </predicate>
    
            <predicate operator="IN" parameter="ecm:currentLifeCycleState">
              <field name="currentLifeCycleStates" schema="advanced_search"/>
            </predicate>
          </whereClause>
    
          <sortColumn>
            <field name="sortColumn" schema="advanced_search"/>
          </sortColumn>
    
          <sortAscending>
            <field name="sortAscending" schema="advanced_search"/>
          </sortAscending>
    
        </queryModel>

XML source

<extension point="model" target="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService">

    <queryModel name="CURRENT_DOC_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isCheckedInVersion
        = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
        ecm:currentLifeCycleState != 'deleted'
      </pattern>
      <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
      <max>20</max>
    </queryModel>

    <queryModel name="CURRENT_DOC_DELETED_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isCheckedInVersion
        = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
        ecm:currentLifeCycleState = 'deleted'
      </pattern>
      <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
      <max>20</max>
    </queryModel>

    <queryModel name="CURRENT_DOC_ORDERED_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isCheckedInVersion
        = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
        ecm:currentLifeCycleState != 'deleted' ORDER BY ecm:pos
      </pattern>
      <sortable value="false"/>
      <max>20</max>
    </queryModel>

    <!-- This query model may be used to list children in the tree navigation
      
      Note the "ecm:isProxy = 0" predicate optimization that is required to
      simplify greatly the request performed by the tree manager when
      browsing on folders with a lot of files when using the Visible SQL Storage.
    -->
    <queryModel name="TREE_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
        ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
        AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
        'deleted'
      </pattern>
      <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
      <max>50</max>
    </queryModel>

    <queryModel name="TREE_ORDERED_CHILDREN">
      <pattern>
        SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isProxy = 0 AND
        ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
        AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState !=
        'deleted' ORDER BY ecm:pos
      </pattern>
      <sortable value="false"/>
      <max>50</max>
    </queryModel>

    <queryModel name="SIMPLE_SEARCH">
      <pattern>
        SELECT * FROM Document WHERE ecm:fulltext LIKE ? AND ecm:mixinType !=
        'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND
        ecm:currentLifeCycleState != 'deleted'
      </pattern>
      <max>20</max>
      <sortable value="true"/>
    </queryModel>

    <queryModel docType="AdvancedSearch" name="ADVANCED_SEARCH">
      <max>20</max>
      <whereClause>

        <predicate operator="FULLTEXT" parameter="ecm:fulltext">
          <field name="fulltext_all" schema="advanced_search"/>
        </predicate>

        <predicate operator="=" parameter="ecm:isCheckedInVersion">
          <field name="isCheckedInVersion" schema="advanced_search"/>
        </predicate>

        <predicate operator="STARTSWITH" parameter="ecm:path">
          <field name="searchpath" schema="advanced_search"/>
        </predicate>

        <predicate operator="FULLTEXT" parameter="dc:title">
          <field name="title" schema="advanced_search"/>
        </predicate>

        <predicate operator="FULLTEXT" parameter="dc:description">
          <field name="description" schema="advanced_search"/>
        </predicate>

        <predicate operator="LIKE" parameter="dc:rights">
          <field name="rights" schema="advanced_search"/>
        </predicate>

        <predicate operator="LIKE" parameter="dc:source">
          <field name="source" schema="advanced_search"/>
        </predicate>

        <predicate operator="IN" parameter="dc:coverage">
          <field name="coverage" schema="advanced_search"/>
        </predicate>

        <predicate operator="IN" parameter="dc:subjects">
          <field name="subjects" schema="advanced_search"/>
        </predicate>

        <predicate operator="BETWEEN" parameter="dc:created">
          <field name="created_min" schema="advanced_search"/>
          <field name="created_max" schema="advanced_search"/>
        </predicate>

        <predicate operator="BETWEEN" parameter="dc:modified">
          <field name="modified_min" schema="advanced_search"/>
          <field name="modified_max" schema="advanced_search"/>
        </predicate>

        <predicate operator="BETWEEN" parameter="dc:issued">
          <field name="issued_min" schema="advanced_search"/>
          <field name="issued_max" schema="advanced_search"/>
        </predicate>

        <predicate operator="BETWEEN" parameter="dc:valid">
          <field name="valid_min" schema="advanced_search"/>
          <field name="valid_max" schema="advanced_search"/>
        </predicate>

        <predicate operator="BETWEEN" parameter="dc:expired">
          <field name="expired_min" schema="advanced_search"/>
          <field name="expired_max" schema="advanced_search"/>
        </predicate>

        <predicate operator="LIKE" parameter="dc:format">
          <field name="format" schema="advanced_search"/>
        </predicate>

        <predicate operator="LIKE" parameter="dc:language">
          <field name="language" schema="advanced_search"/>
        </predicate>

        <predicate operator="IN" parameter="ecm:currentLifeCycleState">
          <field name="currentLifeCycleStates" schema="advanced_search"/>
        </predicate>
      </whereClause>

      <sortColumn>
        <field name="sortColumn" schema="advanced_search"/>
      </sortColumn>

      <sortAscending>
        <field name="sortAscending" schema="advanced_search"/>
      </sortAscending>

    </queryModel>

  </extension>