public class ClientPersistenceHelper extends AbstractClientHelper implements FormTransactionBuilderI, de.ipcon.db.core.TransactionProviderI, de.ipcon.db.core.SaveBOListenerI
| Constructor and Description |
|---|
ClientPersistenceHelper(Client _client) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSaveBOListener(de.ipcon.db.core.SaveBOListenerI l)
Adds the passed SaveBOListenerI to the list of listeners, wrapped in a WeakReference.
|
void |
flushCaches() |
BO |
getBO(java.lang.Long id,
java.lang.Class classTip) |
de.ipcon.db.core.CodebausteinStorageI |
getCodebausteinStorage()
Returns the lazily initialized storage provider for Codebausteine.
|
FulltextSearcherI |
getFulltextSearcher() |
Transaction |
getNewFormTransaction()
Creates an interactive form transaction initialized with the current user.
|
Transaction |
getNewFormTransaction(java.lang.String desc)
Creates an interactive form transaction initialized with the current user
and an identifying description for auditing and debugging.
|
Transaction |
getNewTransaction() |
Transaction |
getNewTransaction(BOLoaderI loader,
SchemaI txSchema,
java.lang.String desc,
de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier)
Central internal factory method to create and fully initialize a new database transaction.
|
Transaction |
getNewTransaction(java.lang.String desc) |
Transaction |
getNewTransaction(java.lang.String desc,
de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier) |
Transaction |
getNewTransaction(de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier) |
Transaction |
getNewTransactionWithInstrumentedSchema() |
Transaction |
getNewTransactionWithInstrumentedSchema(java.lang.String desc) |
Transaction |
getNewTransactionWithInstrumentedSchema(java.lang.String desc,
de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier) |
Transaction |
getNewTransactionWithInstrumentedSchema(de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier) |
StrukturCache |
getStrukturCache() |
boolean |
isMemoryTightClient()
Checks non-blockingly whether the client's local persistence and caching layer is operating
under memory constraints.
|
boolean |
isNotificationSystemActivated() |
java.util.List |
queryBO(groovy.lang.GString gs)
Executes a database query dynamically constructed via Groovy GString interpolation.
|
java.util.List |
queryBO(java.lang.String query) |
java.util.List |
queryBO(java.lang.String query,
java.lang.Object[] params) |
void |
removeSaveBOListener(de.ipcon.db.core.SaveBOListenerI l)
Removes the passed SaveBOListenerI from the list of listeners.
|
TransactionAnswer |
saveBO(Transaction tx)
Convenience overload delegating to
saveBO(Transaction, boolean) with
ignoreConflicts set to true (last-write-wins) for backwards compatibility. |
TransactionAnswer |
saveBO(Transaction tx,
boolean ignoreConflicts)
Coordinates the client-side persistence pipeline:
Synchronizes pending EDT events and pauses the transaction message bus.
|
void |
transactionSaveSuccess(Transaction stubTx,
java.util.Map<java.lang.Long,java.lang.Long> tempIdToDbIdMap,
java.util.function.Predicate<Transaction> isSavedTransactionInstancePredicate)
Notifies all registered SaveBOListenerI-s about a successfully saved Transaction via the transactionSaveSuccess-callback.
|
clientpublic ClientPersistenceHelper(Client _client)
public TransactionAnswer saveBO(Transaction tx)
Convenience overload delegating to saveBO(Transaction, boolean) with
ignoreConflicts set to true (last-write-wins) for backwards compatibility.
saveBO in interface de.ipcon.db.core.TransactionProviderItx - the transaction to persist; must not be nullTransactionAnswer, or null if tx contained no changespublic TransactionAnswer saveBO(Transaction tx, boolean ignoreConflicts)
Coordinates the client-side persistence pipeline:
tx.beforeVerifyOnClient,
verifyOnClient, afterVerifyOnClient) unless explicitly bypassed or restoring
undo state without time-travel.BOSaver with up to 5 automatic retries on
RepeatableSaveException.ignoreConflicts is false and an optimistic concurrency conflict occurs
(mismatched lmod), prompts the user interactively via an EDT dialog to reload,
re-apply, or abort changes.
Upon successful persistence, the transaction is committed and deactivated. If persistence fails
or conflicts remain unresolved, the transaction remains active and may contain updated lmod
timestamps or replayed modifications for subsequent attempts.
saveBO in interface de.ipcon.db.core.TransactionProviderItx - transaction to persist; must not be nullignoreConflicts - if true, server-side optimistic locking conflict detection
is bypassedTransactionAnswer, or null if no changes were pendingTransactionConflictException - if conflicts cannot be resolved interactivelySaveException - if client verification vetoes saving or a fatal storage error occurspublic Transaction getNewFormTransaction()
FormTransactionBuilderIgetNewFormTransaction in interface FormTransactionBuilderIpublic Transaction getNewFormTransaction(java.lang.String desc)
FormTransactionBuilderIgetNewFormTransaction in interface FormTransactionBuilderIdesc - transaction description; may be nullpublic Transaction getNewTransaction()
getNewTransaction in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransaction(java.lang.String desc)
getNewTransaction in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransaction(de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier)
getNewTransaction in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransaction(java.lang.String desc, de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier)
getNewTransaction in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransactionWithInstrumentedSchema()
getNewTransactionWithInstrumentedSchema in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransactionWithInstrumentedSchema(java.lang.String desc)
getNewTransactionWithInstrumentedSchema in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransactionWithInstrumentedSchema(de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier)
getNewTransactionWithInstrumentedSchema in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransactionWithInstrumentedSchema(java.lang.String desc, de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier)
getNewTransactionWithInstrumentedSchema in interface de.ipcon.db.core.TransactionBuilderIpublic Transaction getNewTransaction(BOLoaderI loader, SchemaI txSchema, java.lang.String desc, de.ipcon.db.core.TemporaryIdSupplierI tempIdSupplier)
loader - The BO loader to use.txSchema - The schema to use (optional).desc - A description for the transaction (optional).tempIdSupplier - A supplier for temporary IDs (optional).Transaction.java.lang.IllegalStateException - if not connected to a server.public void transactionSaveSuccess(Transaction stubTx, java.util.Map<java.lang.Long,java.lang.Long> tempIdToDbIdMap, java.util.function.Predicate<Transaction> isSavedTransactionInstancePredicate)
transactionSaveSuccess in interface de.ipcon.db.core.SaveBOListenerIpublic void addSaveBOListener(de.ipcon.db.core.SaveBOListenerI l)
public void removeSaveBOListener(de.ipcon.db.core.SaveBOListenerI l)
public java.util.List queryBO(groovy.lang.GString gs)
gs - The GString query template.public java.util.List queryBO(java.lang.String query)
public java.util.List queryBO(java.lang.String query,
java.lang.Object[] params)
public BO getBO(java.lang.Long id, java.lang.Class classTip)
public void flushCaches()
public boolean isMemoryTightClient()
true if memory is tight or restricted; false otherwisepublic boolean isNotificationSystemActivated()
public FulltextSearcherI getFulltextSearcher()
public de.ipcon.db.core.CodebausteinStorageI getCodebausteinStorage()
CodebausteinStorageI instancepublic StrukturCache getStrukturCache()
Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.