mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-19 21:50:45 +00:00
Merge pull request #55 from Kingsrook/feature/CE-773-cartonization-playground
Feature/ce 773 cartonization playground
This commit is contained in:
@ -132,6 +132,15 @@ public class InsertAction extends AbstractQActionFunction<InsertInput, InsertOut
|
||||
////////////////////////////////////
|
||||
InsertOutput insertOutput = insertInterface.execute(insertInput);
|
||||
|
||||
if(insertOutput.getRecords() == null)
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// in case the module failed to set record in the output, put an empty list there //
|
||||
// to avoid so many downstream NPE's //
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
insertOutput.setRecords(new ArrayList<>());
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
// log if there were errors //
|
||||
//////////////////////////////
|
||||
|
@ -137,6 +137,15 @@ public class UpdateAction
|
||||
////////////////////////////////////
|
||||
UpdateOutput updateOutput = updateInterface.execute(updateInput);
|
||||
|
||||
if(updateOutput.getRecords() == null)
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// in case the module failed to set record in the output, put an empty list there //
|
||||
// to avoid so many downstream NPE's //
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
updateOutput.setRecords(new ArrayList<>());
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
// log if there were errors //
|
||||
//////////////////////////////
|
||||
|
@ -480,6 +480,11 @@ public class QInstanceValidator
|
||||
validateTableCustomizer(tableName, entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
if(table.getBackendDetails() != null)
|
||||
{
|
||||
table.getBackendDetails().validate(qInstance, table, this);
|
||||
}
|
||||
|
||||
validateTableAutomationDetails(qInstance, table);
|
||||
validateTableUniqueKeys(table);
|
||||
validateAssociatedScripts(table);
|
||||
|
@ -23,6 +23,9 @@ package com.kingsrook.qqq.backend.core.model.metadata.tables;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.kingsrook.qqq.backend.core.instances.QInstanceValidator;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.QInstance;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.processes.QProcessMetaData;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.serialization.QTableBackendDetailsDeserializer;
|
||||
import com.kingsrook.qqq.backend.core.modules.backend.QBackendModuleInterface;
|
||||
|
||||
@ -100,4 +103,16 @@ public abstract class QTableBackendDetails
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
public void validate(QInstance qInstance, QTableMetaData table, QInstanceValidator qInstanceValidator)
|
||||
{
|
||||
////////////////////////
|
||||
// noop in base class //
|
||||
////////////////////////
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user