Database / Reference data

practicemaster

Farming practice catalogue (e.g. AP-GOV-KAP-A_GRADE) with display order.

Table factsheetagri_db
Written by
  • Legacy setup (PracticeMasterDTO)
  • Repo.insertPracticeMaster (DataSetup, DataUtil, IePortfolioRepositoryImpl); deletePracticeMaster clears first
Read by
  • Portfolio and compact block practice pickers (loadAllPracticeMasters by sequence)
  • getPracticeNameByCodeAndLanguage (IEPortfolioMapper)
  • getPracticeMastersByName
Filled from
POST api/setupdata/v2 (PracticeMasterDTO)
GET /gateway/portfolio-service/api/v1/practices/active
Sync
Has appId/opId/syncStatus from BaseEntity, but rows are download-only: syncStatus stays SYNC_DONE and opId is unused.
Source
data/src/main/java/org/mindtree/app/agricultor/data/entity/PracticeMaster.kt

Columns

ColumnTypeNullKeyMeaning
practiceCodeTEXTYesPractice code, e.g. AP-GOV-KAP-A_GRADE. Matches PLI practiceMasterCodes.
idINTEGERYesIndexServer id. Null or 0 until the row is synced. Index: unique.
uuidTEXTYesStable business UUID, also sent to the server.
sequenceINTEGERYesDisplay order.
appIdTEXTNoPKClient-side UUID. Defaults to a random UUID when the object is built, including when server JSON is parsed.
opIdTEXTYesId of the last queued operation in the library queue (SYNC_QUEUE_DB).
syncStatusTEXTNoSYNC_NOT_INITIALIZED | IN_SYNC_QUEUE | SYNC_DONE (default).