Package lumis.doui.table
Class QueryBuilder
- java.lang.Object
-
- lumis.doui.table.QueryBuilder
-
- Direct Known Subclasses:
ContentQueryBuilder
,LastContentsQueryBuilder
,WorkflowStatusQueryBuilder
@StableMinor(version="14.0", sinceVersion="4.0") public class QueryBuilder extends Object
Builds queries based on a source and parameters.- Since:
- 4.0.0
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description 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
Constructors Constructor Description QueryBuilder(IParameters parameters, TableSource source, ITransaction transaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
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.
-
-