mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
CE-607 add query joins to GetInput
This commit is contained in:
@ -23,7 +23,9 @@ package com.kingsrook.qqq.backend.core.model.actions.tables;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import com.kingsrook.qqq.backend.core.actions.QBackendTransaction;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryJoin;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -49,6 +51,7 @@ public interface QueryOrGetInputInterface
|
||||
this.setShouldMaskPasswords(source.getShouldMaskPasswords());
|
||||
this.setIncludeAssociations(source.getIncludeAssociations());
|
||||
this.setAssociationNamesToInclude(source.getAssociationNamesToInclude());
|
||||
this.setQueryJoins(source.getQueryJoins());
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@ -146,4 +149,17 @@ public interface QueryOrGetInputInterface
|
||||
*******************************************************************************/
|
||||
void setAssociationNamesToInclude(Collection<String> associationNamesToInclude);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for queryJoins
|
||||
*******************************************************************************/
|
||||
List<QueryJoin> getQueryJoins();
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for queryJoins
|
||||
**
|
||||
*******************************************************************************/
|
||||
void setQueryJoins(List<QueryJoin> queryJoins);
|
||||
|
||||
}
|
||||
|
@ -23,11 +23,14 @@ package com.kingsrook.qqq.backend.core.model.actions.tables.get;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.kingsrook.qqq.backend.core.actions.QBackendTransaction;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.AbstractTableActionInput;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.tables.QueryOrGetInputInterface;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryJoin;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -47,6 +50,7 @@ public class GetInput extends AbstractTableActionInput implements QueryOrGetInpu
|
||||
private boolean shouldOmitHiddenFields = true;
|
||||
private boolean shouldMaskPasswords = true;
|
||||
|
||||
private List<QueryJoin> queryJoins = null;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// if you say you want to includeAssociations, you can limit which ones by passing them in associationNamesToInclude. //
|
||||
@ -411,4 +415,51 @@ public class GetInput extends AbstractTableActionInput implements QueryOrGetInpu
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for queryJoins
|
||||
*******************************************************************************/
|
||||
public List<QueryJoin> getQueryJoins()
|
||||
{
|
||||
return (this.queryJoins);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for queryJoins
|
||||
*******************************************************************************/
|
||||
public void setQueryJoins(List<QueryJoin> queryJoins)
|
||||
{
|
||||
this.queryJoins = queryJoins;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for queryJoins
|
||||
*******************************************************************************/
|
||||
public GetInput withQueryJoins(List<QueryJoin> queryJoins)
|
||||
{
|
||||
this.queryJoins = queryJoins;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for queryJoins
|
||||
**
|
||||
*******************************************************************************/
|
||||
public GetInput withQueryJoin(QueryJoin queryJoin)
|
||||
{
|
||||
if(this.queryJoins == null)
|
||||
{
|
||||
this.queryJoins = new ArrayList<>();
|
||||
}
|
||||
this.queryJoins.add(queryJoin);
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user