Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1027601 // persistentConcepts - make persistent Concepts instance not stored in db_mainConcepts()

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (12742L/87K).

static Pair<Concepts, AutoCloseable> persistentConcepts(S dbProgramID, S caseID) {
  Concepts cc = newConceptsWithClassFinder(dbProgramID + (nempty(caseID) ? "/" + caseID : ""));
  S botName = botNameForConcepts(cc);
  try {
    ensureDBNotRunning(botName);
  } on fail {
    cc.dontSave = true; // SAFETY
  }
  
  cc.persist();
  ret pair(cc, combineAutoCloseables(cc,
    methodsBot2(botName, cc, db_standardExposedMethods(), cc.lock)));
}

Author comment

Began life as a copy of #1005952

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027601
Snippet name: persistentConcepts - make persistent Concepts instance not stored in db_mainConcepts()
Eternal ID of this version: #1027601/11
Text MD5: 256810f7915f2eefe8a45e9c56cc47c3
Transpilation MD5: c7e74b5cb6423289fbed53bbe78bff64
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-25 17:01:06
Source code size: 453 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 271 / 358
Version history: 10 change(s)
Referenced in: [show references]