Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:APIJSON APIJSON AbstractVerifier AccessFakeDeleteMap

From Leeroopedia
Knowledge Sources
Domains ORM, Soft_Delete, Configuration
Last Updated 2026-10-11 00:00 GMT

Overview

Static configuration map that stores per-table fake-delete settings (deleted key, active value, deleted value) loaded from the Access database table, provided by the APIJSON ORM framework.

Description

The ACCESS_FAKE_DELETE_MAP is a static Map<String, Map<String, Object>> on AbstractVerifier. It maps table names to their fake-delete configuration:

  • deletedKey: The column name that holds the soft-delete flag (e.g., "isDeleted")
  • notDeletedValue: The value indicating an active (not deleted) row (e.g., 0)
  • deletedValue: The value indicating a deleted row (e.g., 1)

The map is initialized as an empty LinkedHashMap in the static initializer and is populated at application startup by loading records from the Access database table.

The map is consumed by:

  • AbstractSQLConfig.isFakeDelete() - checks if the current table has fake-delete config
  • AbstractSQLConfig.onFakeDelete() - sets the deleted flag value
  • AbstractSQLConfig.getWhereString() - appends deletedKey = notDeletedValue filter to GET queries
  • AbstractSQLExecutor.executeAppJoin() - applies fake-delete filter to APP JOIN child queries

Usage

Populated at startup by the application's initialization code. Not typically accessed directly by application code; the framework reads it during SQL generation.

Code Reference

Source Location

  • Repository: APIJSON
  • File: src/main/java/apijson/orm/AbstractVerifier.java

Signature

@NotNull
public static Map<String, Map<String, Object>> ACCESS_FAKE_DELETE_MAP;

// Initialized as:
// ACCESS_FAKE_DELETE_MAP = new LinkedHashMap<>();

Import

import apijson.orm.AbstractVerifier;

I/O Contract

Inputs

Name Type Required Description
(table name) String Yes Key in the map

Outputs

Name Type Description
config Map<String,Object> Fake-delete config with deletedKey, notDeletedValue, deletedValue

Usage Examples

Loading Fake-Delete Config

// At application startup, load from Access table:
Map<String, Object> momentFakeDelete = new HashMap<>();
momentFakeDelete.put("deletedKey", "isDeleted");
momentFakeDelete.put("notDeletedValue", 0);
momentFakeDelete.put("deletedValue", 1);
AbstractVerifier.ACCESS_FAKE_DELETE_MAP.put("Moment", momentFakeDelete);

// Now DELETE on Moment table will:
// 1. isFakeDelete() returns true (table in map, method=DELETE)
// 2. onFakeDelete() sets isDeleted=1
// 3. SQL: UPDATE Moment SET isDeleted=1 WHERE id=123

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment