Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.search.api.client.querymodel.descriptor
Class QueryModelDescriptor

java.lang.Object
  extended by org.nuxeo.ecm.core.search.api.client.querymodel.descriptor.QueryModelDescriptor

public class QueryModelDescriptor
extends Object


Field Summary
 List<FacetDescriptor> filterFacets
           
 
Constructor Summary
QueryModelDescriptor()
           
QueryModelDescriptor(String name, String docType, Integer max, WhereClauseDescriptor whereClause, FieldDescriptor sortColumnField, FieldDescriptor sortAscendingField)
           
QueryModelDescriptor(String name, String docType, String pattern, List<FacetDescriptor> filterFacets, WhereClauseDescriptor whereClause)
           
 
Method Summary
 FieldDescriptor getBatchLength()
           
 FieldDescriptor getBatchSize()
           
 Boolean getDefaultSortAscending()
           
 String getDefaultSortColumn()
           
 SortInfo getDefaultSortInfo(DocumentModel model)
           
 String getDocType()
           
 Filter getFilter()
           
 Integer getMax()
           
 String getName()
           
 String getPattern()
           
 String getQuery(DocumentModel model)
           
 String getQuery(DocumentModel model, SortInfo sortInfo)
           
 String getQuery(Object[] params)
           
 String getQuery(Object[] params, SortInfo sortInfo)
           
 Boolean getSortable()
           
 FieldDescriptor getSortAscendingField()
           
 FieldDescriptor getSortColumnField()
           
 WhereClauseDescriptor getWhereClause()
           
 void initEscaper(RuntimeContext context)
          Init the escaper object for stateful query models.
 boolean isSortable()
           
 boolean isStateful()
           
 boolean isStateless()
           
static String prepareStringLiteral(String s)
          Return the string literal in a form ready to embed in an NXQL statement.
 void setBatchLength(FieldDescriptor batchLength)
           
 void setBatchSize(FieldDescriptor batchSize)
           
 void setDefaultSortAscending(Boolean defaultSortAscending)
           
 void setDefaultSortColumn(String defaultSortColumn)
           
 void setMax(Integer max)
           
 void setName(String name)
           
 void setPattern(String pattern)
           
 void setSortable(Boolean sortable)
           
 void setSortAscendingField(FieldDescriptor sortAscendingField)
           
 void setSortColumnField(FieldDescriptor sortColumnField)
           
 void setWhereClause(WhereClauseDescriptor whereClause)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filterFacets

public List<FacetDescriptor> filterFacets
Constructor Detail

QueryModelDescriptor

public QueryModelDescriptor()

QueryModelDescriptor

public QueryModelDescriptor(String name,
                            String docType,
                            String pattern,
                            List<FacetDescriptor> filterFacets,
                            WhereClauseDescriptor whereClause)

QueryModelDescriptor

public QueryModelDescriptor(String name,
                            String docType,
                            Integer max,
                            WhereClauseDescriptor whereClause,
                            FieldDescriptor sortColumnField,
                            FieldDescriptor sortAscendingField)
Method Detail

setPattern

public void setPattern(String pattern)

getBatchSize

public FieldDescriptor getBatchSize()

setBatchSize

public void setBatchSize(FieldDescriptor batchSize)

getBatchLength

public FieldDescriptor getBatchLength()

setBatchLength

public void setBatchLength(FieldDescriptor batchLength)

getDefaultSortColumn

public String getDefaultSortColumn()

setDefaultSortColumn

public void setDefaultSortColumn(String defaultSortColumn)

getDefaultSortAscending

public Boolean getDefaultSortAscending()

setDefaultSortAscending

public void setDefaultSortAscending(Boolean defaultSortAscending)

getSortable

public Boolean getSortable()

setSortable

public void setSortable(Boolean sortable)

getPattern

public String getPattern()

setName

public void setName(String name)

setSortColumnField

public void setSortColumnField(FieldDescriptor sortColumnField)

setSortAscendingField

public void setSortAscendingField(FieldDescriptor sortAscendingField)

isStateless

public boolean isStateless()

isStateful

public boolean isStateful()

getDocType

public String getDocType()

getQuery

public String getQuery(DocumentModel model)
                throws ClientException
Throws:
ClientException

getDefaultSortInfo

public SortInfo getDefaultSortInfo(DocumentModel model)

getQuery

public String getQuery(DocumentModel model,
                       SortInfo sortInfo)
                throws ClientException
Throws:
ClientException

getQuery

public String getQuery(Object[] params)
                throws ClientException
Throws:
ClientException

prepareStringLiteral

public static String prepareStringLiteral(String s)
Return the string literal in a form ready to embed in an NXQL statement. TODO remove this once we work on org.nuxeo.core, v 1.4

Parameters:
s -
Returns:

getQuery

public String getQuery(Object[] params,
                       SortInfo sortInfo)
                throws ClientException
Throws:
ClientException

getMax

public Integer getMax()

setMax

public void setMax(Integer max)

getName

public String getName()

getFilter

public Filter getFilter()

getWhereClause

public WhereClauseDescriptor getWhereClause()

setWhereClause

public void setWhereClause(WhereClauseDescriptor whereClause)

getSortColumnField

public FieldDescriptor getSortColumnField()

getSortAscendingField

public FieldDescriptor getSortAscendingField()

isSortable

public boolean isSortable()

initEscaper

public void initEscaper(RuntimeContext context)
Init the escaper object for stateful query models.

This is meant to be called at extension point contribution registration time.

Parameters:
context - surrounding context, used to load the correct class.

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.