Nuxeo Enterprise Platform 5.1

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
protected  FieldDescriptor batchLength
           
protected  FieldDescriptor batchSize
           
protected  boolean defaultSortAscending
           
protected  String defaultSortColumn
           
protected  String docType
           
 List<FacetDescriptor> filterFacets
           
protected  Integer max
           
protected  String name
           
protected  String pattern
           
protected  FieldDescriptor sortAscendingField
           
protected  FieldDescriptor sortColumnField
           
protected  WhereClauseDescriptor whereClause
           
 
Constructor Summary
QueryModelDescriptor()
           
QueryModelDescriptor(String name, String docType, String pattern, List<FacetDescriptor> filterFacets, WhereClauseDescriptor whereClause)
           
 
Method Summary
 SortInfo getDefaultSortInfo(DocumentModel model)
           
 String getDocType()
           
 Filter getFilter()
           
 Integer getMax()
           
 String getName()
           
 String getQuery(DocumentModel model)
           
 String getQuery(DocumentModel model, SortInfo sortInfo)
           
 String getQuery(Object[] params)
           
 String getQuery(Object[] params, SortInfo sortInfo)
           
 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 setWhereClause(WhereClauseDescriptor whereClause)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

docType

protected String docType

pattern

protected String pattern

whereClause

protected WhereClauseDescriptor whereClause

sortColumnField

protected FieldDescriptor sortColumnField

sortAscendingField

protected FieldDescriptor sortAscendingField

batchSize

protected FieldDescriptor batchSize

batchLength

protected FieldDescriptor batchLength

filterFacets

public List<FacetDescriptor> filterFacets

defaultSortColumn

protected String defaultSortColumn

defaultSortAscending

protected boolean defaultSortAscending

max

protected Integer max
Constructor Detail

QueryModelDescriptor

public QueryModelDescriptor()

QueryModelDescriptor

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

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)
                            throws ClientException
Throws:
ClientException

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()

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 Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.