Package lumis.doui.table
Class QueryBuilder
- java.lang.Object
-
- lumis.doui.table.QueryBuilder
-
- Direct Known Subclasses:
ContentQueryBuilder
,LastContentsQueryBuilder
,WorkflowStatusQueryBuilder
@StableMinor(version="16.0", sinceVersion="4.0") public class QueryBuilder extends java.lang.Object
Builds queries based on a source and parameters.- Since:
- 4.0.0
- Version:
- $Revision: 25809 $ $Date: 2023-07-04 15:23:22 -0300 (Tue, 04 Jul 2023) $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,TableSourceFieldMapping>
mappings
A Map of source fields mappings.protected IParameters
parameters
protected java.lang.String
primaryKey
protected TableSource
source
protected java.lang.String
sourceId
protected org.w3c.dom.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)
java.lang.String
getPrimaryKey()
protected QueryFilterGroup
getPrimaryKeyFilterGroup(QueryBase queryBase)
protected java.util.Vector<QuerySortOrder>
getSortOrders(QueryBase queryBase)
TableSource
getSource()
protected int
getStartAtValue()
QueryTable
getTable(TableSource tableSource)
-
-
-
Field Detail
-
mappings
protected java.util.Map<java.lang.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 java.lang.String sourceId
-
sourceNode
protected org.w3c.dom.Node sourceNode
Deprecated.this attribute should not exist in the future.
-
transaction
protected ITransaction transaction
-
primaryKey
protected java.lang.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 java.lang.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 java.util.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.
-
-