lumis.doui.table
Class QueryBuilder

Package class diagram package QueryBuilder
java.lang.Object
  extended by lumis.doui.table.QueryBuilder
Direct Known Subclasses:
ContentQueryBuilder

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class QueryBuilder
extends Object

Builds queries based on a source and parameters.

Since:
4.0.0

Field Summary
protected  Map<String,TableSourceFieldMapping> mappings
          A Map of source fields mappings.
protected  IParameters parameters
           
protected  String primaryKey
           
protected  TableSource source
           
protected  String sourceId
           
protected  Node sourceNode
          Deprecated. this attribute should not exist in the future.
protected  ITransaction transaction
           
 
Constructor Summary
QueryBuilder(IParameters parameters, TableSource source, ITransaction transaction)
           
 
Method Summary
protected  void addQueryTables(QueryBase queryBase)
           
 QueryDelete buildQueryDelete()
           
 QueryDelete buildQueryDelete(boolean primaryKeysProvided)
           
 QueryInsert buildQueryInsert()
           
 QuerySelect buildQuerySelect()
           
 QueryUpdate buildQueryUpdate()
           
protected  IQueryFilter getFilter(QueryBase queryBase)
           
 String getPrimaryKey()
           
protected  QueryFilterGroup getPrimaryKeyFilterGroup(QueryBase queryBase)
           
protected  Vector<QuerySortOrder> getSortOrders(QueryBase queryBase)
           
 TableSource getSource()
           
protected  int getStartAtValue()
           
 QueryTable getTable(TableSource tableSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mappings

protected Map<String,TableSourceFieldMapping> mappings
A Map of source fields mappings. The key is the fieldId and the value is the mapping instance.

Since:
4.0.4

source

protected TableSource source

parameters

protected IParameters parameters

sourceId

protected String sourceId

sourceNode

protected Node sourceNode
Deprecated. this attribute should not exist in the future.

transaction

protected ITransaction transaction

primaryKey

protected String primaryKey
Constructor Detail

QueryBuilder

public QueryBuilder(IParameters parameters,
                    TableSource source,
                    ITransaction transaction)
             throws PortalException
Throws:
PortalException
Method Detail

buildQueryInsert

public QueryInsert buildQueryInsert()
                             throws PortalException
Throws:
PortalException

buildQueryUpdate

public QueryUpdate buildQueryUpdate()
                             throws PortalException
Throws:
PortalException

buildQueryDelete

public QueryDelete buildQueryDelete()
                             throws PortalException
Throws:
PortalException

buildQueryDelete

public QueryDelete buildQueryDelete(boolean primaryKeysProvided)
                             throws PortalException
Throws:
PortalException

buildQuerySelect

public QuerySelect buildQuerySelect()
                             throws PortalException
Throws:
PortalException

addQueryTables

protected void addQueryTables(QueryBase queryBase)
                       throws PortalException
Throws:
PortalException

getPrimaryKey

public String getPrimaryKey()

getTable

public QueryTable getTable(TableSource tableSource)
                    throws PortalException
Throws:
PortalException

getFilter

protected IQueryFilter getFilter(QueryBase queryBase)
                          throws PortalException
Throws:
PortalException

getStartAtValue

protected int getStartAtValue()
                       throws PortalException
Throws:
PortalException

getSortOrders

protected Vector<QuerySortOrder> getSortOrders(QueryBase queryBase)
                                        throws PortalException
Throws:
PortalException

getPrimaryKeyFilterGroup

protected QueryFilterGroup getPrimaryKeyFilterGroup(QueryBase queryBase)
                                             throws PortalException
Throws:
PortalException

getSource

public TableSource getSource()
Returns:
Returns the source.


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.