Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.storage.sql.coremodel
Class SQLQueryResult

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.coremodel.SQLQueryResult
All Implemented Interfaces:
QueryResult

public class SQLQueryResult
extends java.lang.Object
implements QueryResult

Author:
Florent Guillaume

Nested Class Summary
static class SQLQueryResult.PathComparator
           
 
Constructor Summary
SQLQueryResult(SQLSession session, PartialList<java.io.Serializable> pl, java.lang.Boolean orderByPath, long limit, long offset)
           
 
Method Summary
 long count()
           
 boolean getBoolean(int i)
           
 boolean getBoolean(java.lang.String column)
           
 DocumentModelList getDocumentModels()
           
 DocumentIterator getDocuments(int start)
           
 double getDouble(int i, double defaultValue)
           
 double getDouble(java.lang.String column, double defaultValue)
           
 long getLong(int i, long defaultValue)
           
 long getLong(java.lang.String column, long defaultValue)
           
 java.lang.Object getObject()
           
 java.lang.Object getObject(java.lang.String column)
          Currently not implemented.
 java.lang.String getString(int i)
           
 java.lang.String getString(java.lang.String column)
           
 long getTotalSize()
          Returns the total size the query results would have if no limit and offset was passed.
 boolean isEmpty()
           
 boolean next()
           
 long row()
          Retrieves the current row number. (1 based index) If there is no current row (no next() was called) returns 0
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLQueryResult

public SQLQueryResult(SQLSession session,
                      PartialList<java.io.Serializable> pl,
                      java.lang.Boolean orderByPath,
                      long limit,
                      long offset)
Method Detail

count

public long count()
Specified by:
count in interface QueryResult

getTotalSize

public long getTotalSize()
Description copied from interface: QueryResult
Returns the total size the query results would have if no limit and offset was passed.

Specified by:
getTotalSize in interface QueryResult
Returns:
the total size

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface QueryResult

getDocumentModels

public DocumentModelList getDocumentModels()
                                    throws QueryException
Specified by:
getDocumentModels in interface QueryResult
Throws:
QueryException

getDocuments

public DocumentIterator getDocuments(int start)
Specified by:
getDocuments in interface QueryResult

next

public boolean next()
Specified by:
next in interface QueryResult

getObject

public java.lang.Object getObject()
                           throws QueryException
Specified by:
getObject in interface QueryResult
Throws:
QueryException

row

public long row()
Description copied from interface: QueryResult
Retrieves the current row number. (1 based index)

If there is no current row (no next() was called) returns 0

Specified by:
row in interface QueryResult
Returns:
the current row number

getBoolean

public boolean getBoolean(int i)
                   throws QueryException
Specified by:
getBoolean in interface QueryResult
Throws:
QueryException

getBoolean

public boolean getBoolean(java.lang.String column)
                   throws QueryException
Specified by:
getBoolean in interface QueryResult
Throws:
QueryException

getDouble

public double getDouble(int i,
                        double defaultValue)
                 throws QueryException
Specified by:
getDouble in interface QueryResult
Throws:
QueryException

getDouble

public double getDouble(java.lang.String column,
                        double defaultValue)
                 throws QueryException
Specified by:
getDouble in interface QueryResult
Throws:
QueryException

getLong

public long getLong(int i,
                    long defaultValue)
             throws QueryException
Specified by:
getLong in interface QueryResult
Throws:
QueryException

getLong

public long getLong(java.lang.String column,
                    long defaultValue)
             throws QueryException
Specified by:
getLong in interface QueryResult
Throws:
QueryException

getObject

public java.lang.Object getObject(java.lang.String column)
                           throws QueryException
Description copied from interface: QueryResult
Currently not implemented.

Specified by:
getObject in interface QueryResult
Throws:
QueryException

getString

public java.lang.String getString(int i)
                           throws QueryException
Specified by:
getString in interface QueryResult
Throws:
QueryException

getString

public java.lang.String getString(java.lang.String column)
                           throws QueryException
Specified by:
getString in interface QueryResult
Throws:
QueryException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.