pass only changes for logging datatables updates
This commit is contained in:
+4
-2
@@ -1,5 +1,7 @@
|
|||||||
package org.mifosplatform.infrastructure.dataqueries.handler;
|
package org.mifosplatform.infrastructure.dataqueries.handler;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.mifosplatform.commands.handler.NewCommandSourceHandler;
|
import org.mifosplatform.commands.handler.NewCommandSourceHandler;
|
||||||
import org.mifosplatform.infrastructure.core.api.JsonCommand;
|
import org.mifosplatform.infrastructure.core.api.JsonCommand;
|
||||||
import org.mifosplatform.infrastructure.core.data.EntityIdentifier;
|
import org.mifosplatform.infrastructure.core.data.EntityIdentifier;
|
||||||
@@ -24,9 +26,9 @@ public class UpdateOneToManyDatatableEntryCommandHandler implements
|
|||||||
@Override
|
@Override
|
||||||
public EntityIdentifier processCommand(final JsonCommand command) {
|
public EntityIdentifier processCommand(final JsonCommand command) {
|
||||||
|
|
||||||
this.writePlatformService.updateDatatableEntryOneToMany(command.entityName(), command.resourceId(), command.subResourceId(), command);
|
Map<String, Object> changes = this.writePlatformService.updateDatatableEntryOneToMany(command.entityName(), command.resourceId(), command.subResourceId(), command);
|
||||||
|
|
||||||
return EntityIdentifier.subResourceResult(command.resourceId(), command.subResourceId(),
|
return EntityIdentifier.subResourceResult(command.resourceId(), command.subResourceId(),
|
||||||
command.commandId());
|
command.commandId(), changes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-1
@@ -24,7 +24,6 @@ public class UpdateOneToOneDatatableEntryCommandHandler implements NewCommandSou
|
|||||||
@Override
|
@Override
|
||||||
public EntityIdentifier processCommand(final JsonCommand command) {
|
public EntityIdentifier processCommand(final JsonCommand command) {
|
||||||
|
|
||||||
// TODO - return only detected changes
|
|
||||||
Map<String, Object> changes = this.writePlatformService.updateDatatableEntryOneToOne(command.entityName(), command.resourceId(), command);
|
Map<String, Object> changes = this.writePlatformService.updateDatatableEntryOneToOne(command.entityName(), command.resourceId(), command);
|
||||||
|
|
||||||
return EntityIdentifier.resourceResult(command.resourceId(), command.commandId(), changes);
|
return EntityIdentifier.resourceResult(command.resourceId(), command.commandId(), changes);
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ public interface ReadWriteNonCoreDataService {
|
|||||||
|
|
||||||
Map<String, Object> updateDatatableEntryOneToOne(String datatable, Long appTableId, JsonCommand command);
|
Map<String, Object> updateDatatableEntryOneToOne(String datatable, Long appTableId, JsonCommand command);
|
||||||
|
|
||||||
void updateDatatableEntryOneToMany(String datatable, Long appTableId, Long datatableId, JsonCommand command);
|
Map<String, Object> updateDatatableEntryOneToMany(String datatable, Long appTableId, Long datatableId, JsonCommand command);
|
||||||
|
|
||||||
void deleteDatatableEntries(String datatable, Long appTableId);
|
void deleteDatatableEntries(String datatable, Long appTableId);
|
||||||
|
|
||||||
|
|||||||
+827
-659
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user