Class QueryInput
java.lang.Object
com.kingsrook.qqq.backend.core.model.actions.AbstractActionInput
com.kingsrook.qqq.backend.core.model.actions.AbstractTableActionInput
com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryInput
- All Implemented Interfaces:
QueryOrCountInputInterface,QueryOrGetInputInterface,Cloneable
public class QueryInput
extends AbstractTableActionInput
implements QueryOrGetInputInterface, QueryOrCountInputInterface, Cloneable
Input data for the Query action
Todo - maybe make a class between AbstractTableActionInput and {QueryInput,
CountInput, and AggregateInput}, with common attributes for all of these
"read" operations (like, queryHints,
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSet the individual flags that make up a raw read.clone()Getter for associationNamesToIncludeGetter for fieldNamesToIncludeGetter for fieldsToTranslatePossibleValuesGetter for filtergetFlags()Getter for flagsbooleanGetter for includeAssociationsGetter for lockMode: row locks to take (null for none).Getter for queryHintsGetter for queryJoinsGetter for rawReadReason - non-null if this is a raw read.Getter for recordPipebooleanGetter for selectDistinctbooleanGetter for shouldFetchHeavyFieldsbooleanGetter for shouldGenerateDisplayValuesbooleanGetter for shouldMaskPasswordsbooleanGetter for shouldOmitHiddenFieldsbooleanGetter for shouldTranslatePossibleValuesGetter for timeoutSecondsGetter for transactionbooleanhasFlag(ActionFlag flag) booleanhasQueryHint(QueryHint queryHint) null-safely check if query hints map contains the specified hintvoidsetAssociationNamesToInclude(Collection<String> associationNamesToInclude) Setter for associationNamesToIncludevoidsetFieldNamesToInclude(Set<String> fieldNamesToInclude) Setter for fieldNamesToIncludevoidsetFieldsToTranslatePossibleValues(Set<String> fieldsToTranslatePossibleValues) Setter for fieldsToTranslatePossibleValuesvoidsetFilter(QQueryFilter filter) Setter for filtervoidsetFlags(Set<ActionFlag> flags) Setter for flagsvoidsetIncludeAssociations(boolean includeAssociations) Setter for includeAssociationsvoidsetLockMode(QueryLockMode lockMode) Setter for lockModevoidsetQueryHints(EnumSet<QueryHint> queryHints) Setter for queryHintsvoidsetQueryJoins(List<QueryJoin> queryJoins) Setter for queryJoinsvoidsetRecordPipe(RecordPipe recordPipe) Setter for recordPipevoidsetSelectDistinct(boolean selectDistinct) Setter for selectDistinctvoidsetShouldFetchHeavyFields(boolean shouldFetchHeavyFields) Setter for shouldFetchHeavyFieldsvoidsetShouldGenerateDisplayValues(boolean shouldGenerateDisplayValues) Setter for shouldGenerateDisplayValuesvoidsetShouldMaskPasswords(boolean shouldMaskPasswords) Setter for shouldMaskPasswordsvoidsetShouldOmitHiddenFields(boolean shouldOmitHiddenFields) Setter for shouldOmitHiddenFieldsvoidsetShouldTranslatePossibleValues(boolean shouldTranslatePossibleValues) Setter for shouldTranslatePossibleValuesvoidsetTimeoutSeconds(Integer timeoutSeconds) Setter for timeoutSecondsvoidsetTransaction(QBackendTransaction transaction) Setter for transactionwithAssociationNamesToInclude(Collection<String> associationNamesToInclude) Fluent setter for associationNamesToIncludewithFieldNamesToInclude(Set<String> fieldNamesToInclude) Fluent setter for fieldNamesToIncludewithFieldsToTranslatePossibleValues(Set<String> fieldsToTranslatePossibleValues) Fluent setter for fieldsToTranslatePossibleValueswithFilter(QQueryFilter filter) Fluent setter for filterwithFlag(ActionFlag flag) withFlags(Set<ActionFlag> flags) Fluent setter for flagswithIncludeAssociations(boolean includeAssociations) Fluent setter for includeAssociationswithInputSource(InputSource inputSource) Fluent setter for inputSourcewithLockMode(QueryLockMode lockMode) Fluent setter for lockModewithoutQueryHint(QueryHint queryHint) Fluent setter for queryHintswithQueryHint(QueryHint queryHint) Fluent setter for queryHintswithQueryHints(EnumSet<QueryHint> queryHints) Fluent setter for queryHintswithQueryJoin(QueryJoin queryJoin) Fluent setter for queryJoinswithQueryJoins(List<QueryJoin> queryJoins) Fluent setter for queryJoinswithRawRead(RawReadReason rawReadReason) Opt in to a "raw read": hidden fields are returned, password fields are not masked, heavy fields are fetched, and possible-value translation and display values are skipped.withRecordPipe(RecordPipe recordPipe) Fluent setter for recordPipewithSelectDistinct(boolean selectDistinct) Fluent setter for selectDistinctwithShouldFetchHeavyFields(boolean shouldFetchHeavyFields) Fluent setter for shouldFetchHeavyFieldswithShouldGenerateDisplayValues(boolean shouldGenerateDisplayValues) Fluent setter for shouldGenerateDisplayValueswithShouldMaskPasswords(boolean shouldMaskPasswords) Fluent setter for shouldMaskPasswordswithShouldOmitHiddenFields(boolean shouldOmitHiddenFields) Fluent setter for shouldOmitHiddenFieldswithShouldTranslatePossibleValues(boolean shouldTranslatePossibleValues) Fluent setter for shouldTranslatePossibleValueswithTableName(String tableName) Fluent setter for tableNamewithTimeoutSeconds(Integer timeoutSeconds) Fluent setter for timeoutSecondswithTransaction(QBackendTransaction transaction) Fluent setter for transactionMethods inherited from class com.kingsrook.qqq.backend.core.model.actions.AbstractTableActionInput
getActionIdentity, getBackend, getInputSource, getTable, getTableMetaData, getTableName, setInputSource, setTableMetaData, setTableName, withTableMetaDataMethods inherited from class com.kingsrook.qqq.backend.core.model.actions.AbstractActionInput
getAsyncJobCallback, getPermissionBypassReason, getPermissionEnforcement, setAsyncJobCallback, setPermissionEnforcement, withPermissionBypass, withPermissionEnforcementMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.model.actions.tables.QueryOrCountInputInterface
getInputSource, getTable, getTableName, setCommonParamsFrom, setTableNameMethods inherited from interface com.kingsrook.qqq.backend.core.model.actions.tables.QueryOrGetInputInterface
getTableName, setCommonParamsFrom
-
Constructor Details
-
QueryInput
public QueryInput() -
QueryInput
Constructor
-
-
Method Details
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
getFilter
Getter for filter- Specified by:
getFilterin interfaceQueryOrCountInputInterface
-
setFilter
Setter for filter- Specified by:
setFilterin interfaceQueryOrCountInputInterface
-
getRecordPipe
Getter for recordPipe -
setRecordPipe
Setter for recordPipe -
getShouldTranslatePossibleValues
public boolean getShouldTranslatePossibleValues()Getter for shouldTranslatePossibleValues- Specified by:
getShouldTranslatePossibleValuesin interfaceQueryOrGetInputInterface
-
setShouldTranslatePossibleValues
public void setShouldTranslatePossibleValues(boolean shouldTranslatePossibleValues) Setter for shouldTranslatePossibleValues- Specified by:
setShouldTranslatePossibleValuesin interfaceQueryOrGetInputInterface
-
getShouldGenerateDisplayValues
public boolean getShouldGenerateDisplayValues()Getter for shouldGenerateDisplayValues- Specified by:
getShouldGenerateDisplayValuesin interfaceQueryOrGetInputInterface
-
setShouldGenerateDisplayValues
public void setShouldGenerateDisplayValues(boolean shouldGenerateDisplayValues) Setter for shouldGenerateDisplayValues- Specified by:
setShouldGenerateDisplayValuesin interfaceQueryOrGetInputInterface
-
getShouldFetchHeavyFields
public boolean getShouldFetchHeavyFields()Getter for shouldFetchHeavyFields- Specified by:
getShouldFetchHeavyFieldsin interfaceQueryOrGetInputInterface
-
setShouldFetchHeavyFields
public void setShouldFetchHeavyFields(boolean shouldFetchHeavyFields) Setter for shouldFetchHeavyFields- Specified by:
setShouldFetchHeavyFieldsin interfaceQueryOrGetInputInterface
-
getTransaction
Getter for transaction- Specified by:
getTransactionin interfaceQueryOrCountInputInterface- Specified by:
getTransactionin interfaceQueryOrGetInputInterface
-
setTransaction
Setter for transaction- Specified by:
setTransactionin interfaceQueryOrCountInputInterface- Specified by:
setTransactionin interfaceQueryOrGetInputInterface
-
withTransaction
Fluent setter for transaction -
getQueryJoins
Getter for queryJoins- Specified by:
getQueryJoinsin interfaceQueryOrCountInputInterface- Specified by:
getQueryJoinsin interfaceQueryOrGetInputInterface
-
setQueryJoins
Setter for queryJoins- Specified by:
setQueryJoinsin interfaceQueryOrCountInputInterface- Specified by:
setQueryJoinsin interfaceQueryOrGetInputInterface
-
withQueryJoins
Fluent setter for queryJoins -
withQueryJoin
Fluent setter for queryJoins -
getFieldsToTranslatePossibleValues
-
setFieldsToTranslatePossibleValues
-
withFieldsToTranslatePossibleValues
Fluent setter for fieldsToTranslatePossibleValues -
withFilter
Fluent setter for filter -
withRecordPipe
Fluent setter for recordPipe -
withShouldTranslatePossibleValues
Fluent setter for shouldTranslatePossibleValues -
withShouldGenerateDisplayValues
Fluent setter for shouldGenerateDisplayValues -
withShouldFetchHeavyFields
Fluent setter for shouldFetchHeavyFields -
withTableName
Description copied from class:AbstractTableActionInputFluent setter for tableName- Overrides:
withTableNamein classAbstractTableActionInput
-
getIncludeAssociations
public boolean getIncludeAssociations()Getter for includeAssociations- Specified by:
getIncludeAssociationsin interfaceQueryOrGetInputInterface
-
setIncludeAssociations
public void setIncludeAssociations(boolean includeAssociations) Setter for includeAssociations- Specified by:
setIncludeAssociationsin interfaceQueryOrGetInputInterface
-
withIncludeAssociations
Fluent setter for includeAssociations -
getAssociationNamesToInclude
Getter for associationNamesToInclude- Specified by:
getAssociationNamesToIncludein interfaceQueryOrGetInputInterface
-
setAssociationNamesToInclude
Setter for associationNamesToInclude- Specified by:
setAssociationNamesToIncludein interfaceQueryOrGetInputInterface
-
withAssociationNamesToInclude
Fluent setter for associationNamesToInclude -
getShouldMaskPasswords
public boolean getShouldMaskPasswords()Getter for shouldMaskPasswords- Specified by:
getShouldMaskPasswordsin interfaceQueryOrGetInputInterface
-
setShouldMaskPasswords
public void setShouldMaskPasswords(boolean shouldMaskPasswords) Setter for shouldMaskPasswords- Specified by:
setShouldMaskPasswordsin interfaceQueryOrGetInputInterface
-
withShouldMaskPasswords
Fluent setter for shouldMaskPasswords -
getShouldOmitHiddenFields
public boolean getShouldOmitHiddenFields()Getter for shouldOmitHiddenFields- Specified by:
getShouldOmitHiddenFieldsin interfaceQueryOrGetInputInterface
-
setShouldOmitHiddenFields
public void setShouldOmitHiddenFields(boolean shouldOmitHiddenFields) Setter for shouldOmitHiddenFields- Specified by:
setShouldOmitHiddenFieldsin interfaceQueryOrGetInputInterface
-
withShouldOmitHiddenFields
Fluent setter for shouldOmitHiddenFields -
getSelectDistinct
public boolean getSelectDistinct()Getter for selectDistinct -
setSelectDistinct
public void setSelectDistinct(boolean selectDistinct) Setter for selectDistinct -
withSelectDistinct
Fluent setter for selectDistinct -
getTimeoutSeconds
Getter for timeoutSeconds- Specified by:
getTimeoutSecondsin interfaceQueryOrCountInputInterface
-
setTimeoutSeconds
Setter for timeoutSeconds- Specified by:
setTimeoutSecondsin interfaceQueryOrCountInputInterface
-
withTimeoutSeconds
Fluent setter for timeoutSeconds -
getQueryHints
Getter for queryHints- Specified by:
getQueryHintsin interfaceQueryOrCountInputInterface
-
setQueryHints
Setter for queryHints- Specified by:
setQueryHintsin interfaceQueryOrCountInputInterface
-
withQueryHints
Fluent setter for queryHints -
withQueryHint
Fluent setter for queryHints -
withoutQueryHint
Fluent setter for queryHints -
hasQueryHint
null-safely check if query hints map contains the specified hint -
getFieldNamesToInclude
-
setFieldNamesToInclude
-
withFieldNamesToInclude
Fluent setter for fieldNamesToInclude -
getFlags
-
setFlags
-
withFlags
Fluent setter for flags- Parameters:
flags- framework, backend-module, or application defined flags that con be used to drive behaviors. For example, maybe to bypass caching actions, or to customize a query, etc.- Returns:
- this
-
withFlag
-
hasFlag
-
withInputSource
Description copied from class:AbstractTableActionInputFluent setter for inputSource- Overrides:
withInputSourcein classAbstractTableActionInput- Parameters:
inputSource- Indicator of what the source of the action is. Default values from QQQ are USER or SYSTEM (where it can be the case that an action that originated from a USER leads to SYSTEM actions (e.g., running a process - the RunProcessAction is USER initiated, but if that process then runs a query, by default, it would be SYSTEM initiated).- Returns:
- this
-
withRawRead
Opt in to a "raw read": hidden fields are returned, password fields are not masked, heavy fields are fetched, and possible-value translation and display values are skipped. The flags are set here, and re-applied (and the reason's permission check and an audit are done) when the query executes, so a raw read can't be granted by flipping the individual flags, nor undone later by them. Record locks and field security locks still apply, unless the session has the all-access security keys. -
applyRawReadFlags
public void applyRawReadFlags()Set the individual flags that make up a raw read. -
getRawReadReason
Getter for rawReadReason - non-null if this is a raw read. -
getLockMode
Getter for lockMode: row locks to take (null for none). Only on backends that support the mode; run inside a transaction. -
setLockMode
Setter for lockMode -
withLockMode
Fluent setter for lockMode
-