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)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
appandSelectAllJoin(StringBuilder sb, Projekt projekt, Postfach... inboxes)
protected void
appandSingleSelectAllJoin(StringBuilder sb, Projekt projekt, Vorgang v)
protected void
appendCountPost(StringBuilder sb, Map<String,ITableColumn> columnMap)
protected void
appendCountPre(StringBuilder sb, Map<String,ITableColumn> columnMap)
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, Map<String,ITableColumn> fieldMap)
protected StringBuilder
appendOrderStatement(StringBuilder sb, String column, String direction, boolean isCustomColumn)
protected javax.persistence.Query
appendQueryCriterias(StringBuilder sb, IEntityContext ec, Map<String,ITableColumn> columnMap, de.xima.cmn.criteria.QueryCriteriaManager qcm, boolean withOrder)
protected void
appendSelectPost(StringBuilder sb, Map<String,ITableColumn> coulumns)
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, Map<String,ITableColumn> columnMap, Projekt projekt, 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, Map<String,ITableColumn> columnMap, 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, Map<String,ITableColumn> columns, Projekt projekt, long formEingangID, Map<String,String> dataMap)
javax.persistence.Query
createInsertQuery(IEntityContext ec, Map<String,ITableColumn> columns, Projekt projekt, long formEingangID, Map<String,String> dataMap, Integer maxValueSize)
javax.persistence.Query
createSingleQuery(IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt projekt, Vorgang v, de.xima.cmn.criteria.QueryCriteriaManager qcm)
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, Map<String,ITableColumn> fieldMap)
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)
String
transformTableName(String name)
-
-
-
Field Detail
-
LOG
protected static final org.slf4j.Logger LOG
-
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
-
ESC
protected final char ESC
-
-
Constructor Detail
-
AVorgangsDataSQLBuilder
public AVorgangsDataSQLBuilder(EProjectSpecificDBTable tableType)
-
-
Method Detail
-
isBooleanColumn
protected boolean isBooleanColumn(String column)
-
isDateColumn
protected boolean isDateColumn(String column)
-
isIntegerColumn
protected boolean isIntegerColumn(String column)
-
isLongColumn
protected boolean isLongColumn(String column)
-
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)
- 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, Map<String,ITableColumn> columns, Projekt projekt, long formEingangID, Map<String,String> dataMap, Integer maxValueSize)
- 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 insertmaxValueSize
- the max size of the data to insert- Returns:
- an
Query
to perform the insert
-
createSingleQuery
public javax.persistence.Query createSingleQuery(IEntityContext ec, Map<String,ITableColumn> columnMap, Projekt projekt, Vorgang v, de.xima.cmn.criteria.QueryCriteriaManager qcm)
- Specified by:
createSingleQuery
in interfaceIVorgangsDataSQLBuilder
- Parameters:
ec
- the entity context to create the query forcolumnMap
- anMap
of table columnsprojekt
-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, Map<String,ITableColumn> columnMap, Projekt projekt, 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, Map<String,ITableColumn> columnMap, 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
-
appandSingleSelectAllJoin
protected void appandSingleSelectAllJoin(StringBuilder sb, Projekt projekt, Vorgang v)
-
appandSelectAllJoin
protected void appandSelectAllJoin(StringBuilder sb, Projekt projekt, Postfach... inboxes)
-
appendQueryCriterias
protected javax.persistence.Query appendQueryCriterias(StringBuilder sb, IEntityContext ec, Map<String,ITableColumn> columnMap, de.xima.cmn.criteria.QueryCriteriaManager qcm, boolean withOrder)
-
appendOrderByClauses
public StringBuilder appendOrderByClauses(StringBuilder sb, de.xima.cmn.criteria.SortingCriterion[] sortingCriterions, Map<String,ITableColumn> fieldMap)
-
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)
-
appendNonCustomColumnsForInsert
protected void appendNonCustomColumnsForInsert(StringBuilder colSb, StringBuilder valSb, Map<String,String> paramMap)
-
appendOrderStatement
protected StringBuilder appendOrderStatement(StringBuilder sb, String column, String direction, boolean isCustomColumn)
-
appendFilterStatement
protected StringBuilder appendFilterStatement(StringBuilder sb, String column, String operator, String filterValue, boolean isCustomColumn)
-
appendInsertValueStatement
protected StringBuilder appendInsertValueStatement(StringBuilder sb, String key, boolean isCustomColumn)
-
appendInsertKeyStatement
protected StringBuilder appendInsertKeyStatement(StringBuilder sb, String column, boolean isCustomColumn)
-
appendSelectPost
protected void appendSelectPost(StringBuilder sb, Map<String,ITableColumn> coulumns)
-
appendSelectPre
protected void appendSelectPre(StringBuilder sb, Map<String,ITableColumn> coulumns)
-
appendCountPost
protected void appendCountPost(StringBuilder sb, Map<String,ITableColumn> columnMap)
-
appendCountPre
protected void appendCountPre(StringBuilder sb, Map<String,ITableColumn> columnMap)
-
getWhereClause
protected String getWhereClause(String column, de.xima.cmn.criteria.FilterCriterion.Operator operator, String parameter, Map<String,ITableColumn> fieldMap)
-
getOrderByClause
protected String getOrderByClause(de.xima.cmn.criteria.SortingCriterion sorting, Map<String,ITableColumn> fieldMap)
-
-