Package de.xima.fc.dao.impl.sqlbuilder
Class AVorgangsDataSQLBuilder
- java.lang.Object
-
- de.xima.fc.dao.impl.sqlbuilder.AVorgangsDataSQLBuilder
-
- All Implemented Interfaces:
IVorgangsDataSQLBuilder
- Direct Known Subclasses:
DefaultVorgangsDataSQLBuilder
public class AVorgangsDataSQLBuilder extends Object implements IVorgangsDataSQLBuilder
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AVorgangsDataSQLBuilder(EProjectSpecificDBTable tableType, EDatenbankTyp dbType)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected StringBuilder
appendFilterStatement(StringBuilder sb, String column, String operator, String filterValue, boolean isCustomColumn)
protected StringBuilder
appendInsertKeyStatement(StringBuilder sb, String column, boolean isCustomColumn)
protected StringBuilder
appendInsertValueStatement(StringBuilder sb, String key, boolean isCustomColumn)
protected void
appendNonCustomColumnsForInsert(StringBuilder colSb, StringBuilder valSb, Map<String,String> paramMap)
StringBuilder
appendOrderByClauses(StringBuilder sb, de.xima.cmn.criteria.SortingCriterion[] sortingCriterions, Projekt project)
protected StringBuilder
appendOrderStatement(StringBuilder sb, String column, String direction, boolean isCustomColumn)
protected javax.persistence.Query
appendQueryCriterias(StringBuilder sb, IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, boolean withOrder)
protected void
appendSelectPre(StringBuilder sb, Map<String,ITableColumn> coulumns)
int
appendWhereClause(StringBuilder sb, int paramIndex, de.xima.cmn.criteria.FilterCriterion fc, Map<String,ITableColumn> fieldMap, Map<String,String> stringFCs, Map<String,Date> dateFCs, Map<String,Boolean> booleanFCs, Map<String,Integer> integerFCs, Map<String,Long> longFCs, Map<String,List<Long>> longListFCs)
StringBuilder
appendWhereClauses(StringBuilder sb, de.xima.cmn.criteria.FilterCriterion[] filterCriterions, Map<String,ITableColumn> fieldMap, Map<String,String> stringFCs, Map<String,Date> dateFCs, Map<String,Boolean> booleanFCs, Map<String,Integer> integerFCs, Map<String,Long> longFCs, Map<String,List<Long>> longListFCs)
javax.persistence.Query
createAllQuery(IEntityContext ec, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, Postfach... inboxes)
javax.persistence.Query
createAllQuery(IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt projekt, Postfach pf, de.xima.cmn.criteria.QueryCriteriaManager qcm)
javax.persistence.Query
createCountQuery(IEntityContext ec, Projekt projekt, de.xima.cmn.criteria.QueryCriteriaManager qcm, Postfach... inboxes)
javax.persistence.Query
createCountQuery(IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt projekt, Postfach pf, de.xima.cmn.criteria.QueryCriteriaManager qcm)
javax.persistence.Query
createDeleteDataWithoutEntityQuery(IEntityContext ec, Projekt project)
javax.persistence.Query
createDeleteNotCurrentDataQuery(IEntityContext ec, Projekt project)
javax.persistence.Query
createDeleteQuery(IEntityContext ec, Projekt projekt, long formEingangID)
javax.persistence.Query
createInsertQuery(IEntityContext ec, Projekt projekt, long formEingangID, Map<String,String> dataMap, Integer maxValueSize)
javax.persistence.Query
createInsertQuery(IEntityContext ec, Map<String,ITableColumn> columns, Projekt projekt, long formEingangID, Map<String,String> dataMap)
javax.persistence.Query
createSingleQuery(IEntityContext ec, Projekt projekt, Vorgang v, de.xima.cmn.criteria.QueryCriteriaManager qcm)
protected String
escapePath(String path)
protected void
fillParams(javax.persistence.Query query, Map<String,Object> params)
protected void
fillParams(javax.persistence.Query query, Map<String,String> stringFCs, Map<String,Date> dateFCs, Map<String,Boolean> booleanFCs, Map<String,Integer> integerFCs, Map<String,Long> longFCs, Map<String,List<Long>> longListFCs)
protected String
getOrderByClause(de.xima.cmn.criteria.SortingCriterion sorting, Projekt project)
protected String
getTableName(Projekt projekt)
protected String
getWhereClause(String column, de.xima.cmn.criteria.FilterCriterion.Operator operator, String parameter, Map<String,ITableColumn> fieldMap)
protected boolean
isBooleanColumn(String column)
protected boolean
isDateColumn(String column)
protected boolean
isIntegerColumn(String column)
protected boolean
isLongColumn(String column)
String
transformColumn(String name)
protected String
transformEncryptedColumn(String column)
String
transformTableName(String name)
-
-
-
Field Detail
-
LOG
protected static final org.slf4j.Logger LOG
-
CTE_RANKED_SUBMISSIONS
protected static final String CTE_RANKED_SUBMISSIONS
- See Also:
- Constant Field Values
-
CTE_ATTACHMENT_COUNTS
protected static final String CTE_ATTACHMENT_COUNTS
- See Also:
- Constant Field Values
-
SUBMISSION_RANK_ASC
protected static final String SUBMISSION_RANK_ASC
- See Also:
- Constant Field Values
-
SUBMISSION_RANK_DESC
protected static final String SUBMISSION_RANK_DESC
- See Also:
- Constant Field Values
-
TABLE_SUBMISSION
protected static final String TABLE_SUBMISSION
-
VIEW_STATUS
protected final String VIEW_STATUS
-
VIEW_WF_STATE
protected final String VIEW_WF_STATE
-
VIEW_POSTFACH
protected final String VIEW_POSTFACH
-
VIEW_ATTACHMENTS
protected final String VIEW_ATTACHMENTS
-
TABLE_STATUS
protected final String TABLE_STATUS
-
TABLE_WF_STATE
protected final String TABLE_WF_STATE
-
TABLE_POSTFACH
protected final String TABLE_POSTFACH
-
TABLE_VORGANG
protected final String TABLE_VORGANG
-
TABLE_ATTACHMENT
protected final String TABLE_ATTACHMENT
-
TABLE_FORMEINGANG
protected final String TABLE_FORMEINGANG
-
COL_PROJECT_ID
protected final String COL_PROJECT_ID
-
COL_PROJEKT_ID
protected final String COL_PROJEKT_ID
-
COL_VERSION_ID
protected final String COL_VERSION_ID
-
COL_MANDANT_ID
protected final String COL_MANDANT_ID
-
COL_POSTFACH_ID
protected final String COL_POSTFACH_ID
-
COL_PROCESS_ID
protected final String COL_PROCESS_ID
-
COL_STATUS_ID
protected final String COL_STATUS_ID
-
COL_STATUS_NAME
protected final String COL_STATUS_NAME
-
COL_STATUS_DELETABLE
protected final String COL_STATUS_DELETABLE
-
COL_WF_VERSION_FK
protected final String COL_WF_VERSION_FK
-
COL_WF_STATE_ID
protected final String COL_WF_STATE_ID
-
COL_WF_STATE_NAME
protected final String COL_WF_STATE_NAME
-
COL_WF_STATE_TYPE
protected final String COL_WF_STATE_TYPE
-
COL_WF_STATE_DELETABLE
protected final String COL_WF_STATE_DELETABLE
-
COL_WF_STATE_VERSION
protected final String COL_WF_STATE_VERSION
-
COL_POSTFACH_NAME
protected final String COL_POSTFACH_NAME
-
COL_ATTACHMENT_COUNT
protected final String COL_ATTACHMENT_COUNT
-
COL_ID
protected final String COL_ID
-
COL_FORMEINGANG_ID
protected final String COL_FORMEINGANG_ID
-
COL_FORMEINGANG
protected final String COL_FORMEINGANG
-
COL_VORGANG
protected final String COL_VORGANG
-
COL_STATUS_FK
protected final String COL_STATUS_FK
-
COL_WF_STATE_FK
protected final String COL_WF_STATE_FK
-
COL_POSTFACH_FK
protected final String COL_POSTFACH_FK
-
COL_PROCESS_FK
protected final String COL_PROCESS_FK
-
tableType
protected final EProjectSpecificDBTable tableType
-
dbType
protected final EDatenbankTyp dbType
-
ESC
protected final char ESC
-
-
Constructor Detail
-
AVorgangsDataSQLBuilder
public AVorgangsDataSQLBuilder(EProjectSpecificDBTable tableType, EDatenbankTyp dbType)
-
-
Method Detail
-
createDeleteQuery
public javax.persistence.Query createDeleteQuery(IEntityContext ec, Projekt projekt, long formEingangID)
- Specified by:
createDeleteQuery
in interfaceIVorgangsDataSQLBuilder
- Parameters:
ec
- the entity context to create the query forprojekt
-Projekt
formEingangID
-Integer
- Returns:
- a query for deleting an entry
-
createInsertQuery
@Deprecated public javax.persistence.Query createInsertQuery(IEntityContext ec, Map<String,ITableColumn> columns, Projekt projekt, long formEingangID, Map<String,String> dataMap)
Deprecated.- Specified by:
createInsertQuery
in interfaceIVorgangsDataSQLBuilder
- Parameters:
ec
- the entity context to create the query forcolumns
- anMap
of table columnsprojekt
- the project to create the query forformEingangID
- to form record data to create the query fordataMap
- theMap
of data to insert- Returns:
- an
Query
to perform the insert
-
createInsertQuery
public javax.persistence.Query createInsertQuery(IEntityContext ec, Projekt projekt, long formEingangID, Map<String,String> dataMap, Integer maxValueSize)
- Specified by:
createInsertQuery
in interfaceIVorgangsDataSQLBuilder
- Parameters:
ec
- the entity context to create the query forprojekt
- the project to create the query forformEingangID
- to form record data to create the query fordataMap
- theMap
of data to insertmaxValueSize
- the max size of the data to insert- Returns:
- an
Query
to perform the insert
-
createSingleQuery
public javax.persistence.Query createSingleQuery(IEntityContext ec, Projekt projekt, Vorgang v, de.xima.cmn.criteria.QueryCriteriaManager qcm)
- Specified by:
createSingleQuery
in interfaceIVorgangsDataSQLBuilder
- Parameters:
ec
- the entity context to create the query forprojekt
-Projekt
v
-Vorgang
qcm
-QueryCriteriaManager
- Returns:
- a query for a single process
-
createAllQuery
public javax.persistence.Query createAllQuery(IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt projekt, Postfach pf, de.xima.cmn.criteria.QueryCriteriaManager qcm)
- Specified by:
createAllQuery
in interfaceIVorgangsDataSQLBuilder
projekt
-Projekt
pf
-Postfach
may benull
qcm
-QueryCriteriaManager
- Returns:
- a query for all found entries
-
createAllQuery
public javax.persistence.Query createAllQuery(IEntityContext ec, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, Postfach... inboxes)
- Specified by:
createAllQuery
in interfaceIVorgangsDataSQLBuilder
-
createCountQuery
public javax.persistence.Query createCountQuery(IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt projekt, Postfach pf, de.xima.cmn.criteria.QueryCriteriaManager qcm)
- Specified by:
createCountQuery
in interfaceIVorgangsDataSQLBuilder
projekt
-Projekt
pf
-Postfach
may benull
qcm
-QueryCriteriaManager
- Returns:
- a query for counting all found entries
-
createCountQuery
public javax.persistence.Query createCountQuery(IEntityContext ec, Projekt projekt, de.xima.cmn.criteria.QueryCriteriaManager qcm, Postfach... inboxes)
- Specified by:
createCountQuery
in interfaceIVorgangsDataSQLBuilder
-
createDeleteNotCurrentDataQuery
public javax.persistence.Query createDeleteNotCurrentDataQuery(IEntityContext ec, Projekt project)
- Specified by:
createDeleteNotCurrentDataQuery
in interfaceIVorgangsDataSQLBuilder
-
createDeleteDataWithoutEntityQuery
public javax.persistence.Query createDeleteDataWithoutEntityQuery(IEntityContext ec, Projekt project)
- Specified by:
createDeleteDataWithoutEntityQuery
in interfaceIVorgangsDataSQLBuilder
-
appendOrderByClauses
public StringBuilder appendOrderByClauses(StringBuilder sb, de.xima.cmn.criteria.SortingCriterion[] sortingCriterions, Projekt project)
-
appendWhereClauses
public StringBuilder appendWhereClauses(StringBuilder sb, de.xima.cmn.criteria.FilterCriterion[] filterCriterions, Map<String,ITableColumn> fieldMap, Map<String,String> stringFCs, Map<String,Date> dateFCs, Map<String,Boolean> booleanFCs, Map<String,Integer> integerFCs, Map<String,Long> longFCs, Map<String,List<Long>> longListFCs)
-
appendWhereClause
public int appendWhereClause(StringBuilder sb, int paramIndex, de.xima.cmn.criteria.FilterCriterion fc, Map<String,ITableColumn> fieldMap, Map<String,String> stringFCs, Map<String,Date> dateFCs, Map<String,Boolean> booleanFCs, Map<String,Integer> integerFCs, Map<String,Long> longFCs, Map<String,List<Long>> longListFCs)
-
appendFilterStatement
protected StringBuilder appendFilterStatement(StringBuilder sb, String column, String operator, String filterValue, boolean isCustomColumn)
-
appendInsertKeyStatement
protected StringBuilder appendInsertKeyStatement(StringBuilder sb, String column, boolean isCustomColumn)
-
appendInsertValueStatement
protected StringBuilder appendInsertValueStatement(StringBuilder sb, String key, boolean isCustomColumn)
-
appendNonCustomColumnsForInsert
protected void appendNonCustomColumnsForInsert(StringBuilder colSb, StringBuilder valSb, Map<String,String> paramMap)
-
appendOrderStatement
protected StringBuilder appendOrderStatement(StringBuilder sb, String column, String direction, boolean isCustomColumn)
-
appendQueryCriterias
protected javax.persistence.Query appendQueryCriterias(StringBuilder sb, IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, boolean withOrder)
-
appendSelectPre
protected void appendSelectPre(StringBuilder sb, Map<String,ITableColumn> coulumns)
-
fillParams
protected void fillParams(javax.persistence.Query query, Map<String,String> stringFCs, Map<String,Date> dateFCs, Map<String,Boolean> booleanFCs, Map<String,Integer> integerFCs, Map<String,Long> longFCs, Map<String,List<Long>> longListFCs)
-
getOrderByClause
protected String getOrderByClause(de.xima.cmn.criteria.SortingCriterion sorting, Projekt project)
-
getWhereClause
protected String getWhereClause(String column, de.xima.cmn.criteria.FilterCriterion.Operator operator, String parameter, Map<String,ITableColumn> fieldMap)
-
isBooleanColumn
protected boolean isBooleanColumn(String column)
-
isDateColumn
protected boolean isDateColumn(String column)
-
isIntegerColumn
protected boolean isIntegerColumn(String column)
-
isLongColumn
protected boolean isLongColumn(String column)
-
-