Package edm.edom3
Interface EDMLocalContext
-
- All Superinterfaces:
EDMContext
public interface EDMLocalContext extends EDMContext
Supplies methods for the "single-user" and "fat client" LOCAL context
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abortAllTransactions()
Abort (and close) all open transactions.void
abortTransaction()
Abort (and close) current open transaction.void
commitAllTransactions()
Commit (and close) all open transactions.void
commitTransaction()
Commit (and close) current open transactions.EDMTransaction
getActiveTransaction()
Get the current active transactionEDMDebug
getDebug()
Get the Debug interface for this contextboolean
isReserved()
Check if this context has reserved EDMIvoid
refreshInternalData()
Refresh stored internal data from DBvoid
releaseContext()
release EDMI form this context making EDMI avaiable for others.EDMTransaction
reserveContext()
Reserve EDMI for this context.EDMTransaction
reserveContext(long maxWaitMilliseconds)
Reserve EDMI for this context.void
startReadTransaction()
Start (open) a new read transaction.void
startWriteTransaction(EDMModel model)
Start (open) a new write transaction on a single model.void
startWriteTransaction(EDMModel[] models)
Start (open) a new write transaction on multiple models.-
Methods inherited from interface edm.edom3.EDMContext
communication, getContextName, getDataFactory, getGroup, getObject, getSdaiFactory, getServer, getUser, getWorkerFactory, isLocal, login, login, logout, removeObject, setObject
-
-
-
-
Method Detail
-
getDebug
EDMDebug getDebug()
Get the Debug interface for this context- Returns:
- current UserSession, null if none assigned
-
reserveContext
EDMTransaction reserveContext() throws EdmiException
Reserve EDMI for this context. No EDMI data manipulation calls are possible until context reserved- Returns:
- the root (virtual) transaction
- Throws:
EdmiException
- if context reserved or impossible to reserve
-
reserveContext
EDMTransaction reserveContext(long maxWaitMilliseconds) throws EdmiException
Reserve EDMI for this context. No EDMI data manipulation calls are possible until context reserved- Parameters:
maxWaitMilliseconds
- max # milliseconds to wait for context. If < 0 use default. If 0 wait indefinitely.- Returns:
- the root (virtual) transaction
- Throws:
EdmiException
- if context reserved or impossible to reserve
-
releaseContext
void releaseContext() throws EdmiException
release EDMI form this context making EDMI avaiable for others.- Throws:
EdmiException
- if context busy or not reserved
-
isReserved
boolean isReserved()
Check if this context has reserved EDMI- Returns:
- true if EDMI reserved to this context.
-
startReadTransaction
void startReadTransaction() throws EdmiException
Start (open) a new read transaction.- Throws:
EdmiException
- If the method fails, or if the repository filter are unset.
-
startWriteTransaction
void startWriteTransaction(EDMModel model) throws EdmiException
Start (open) a new write transaction on a single model.- Parameters:
model
- model to reserve write access for- Throws:
EdmiException
- If the method fails, or if the repository filter are unset.
-
startWriteTransaction
void startWriteTransaction(EDMModel[] models) throws EdmiException
Start (open) a new write transaction on multiple models.- Parameters:
models
- models to reserve write access for- Throws:
EdmiException
- If the method fails, or if the repository filter are unset.
-
commitTransaction
void commitTransaction() throws EdmiException
Commit (and close) current open transactions.- Throws:
EdmiException
- If the method fails, or if the repository filter are unset.
-
commitAllTransactions
void commitAllTransactions() throws EdmiException
Commit (and close) all open transactions.- Throws:
EdmiException
- If the method fails, or if the repository filter are unset.
-
abortTransaction
void abortTransaction() throws EdmiException
Abort (and close) current open transaction.- Throws:
EdmiException
- If the method fails, or if the repository filter is unset.
-
abortAllTransactions
void abortAllTransactions() throws EdmiException
Abort (and close) all open transactions.- Throws:
EdmiException
- If the method fails, or if the repository filter is unset.
-
getActiveTransaction
EDMTransaction getActiveTransaction()
Get the current active transaction- Returns:
- active transaction, null if not found
-
refreshInternalData
void refreshInternalData() throws EdmiException
Refresh stored internal data from DB- Throws:
EdmiException
- if the method fails
-
-