public abstract class KernelModule extends java.lang.Object implements KernelDatabaseSaverI, DatabaseConnectionProviderI
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
log |
static java.lang.String |
STR_IF_POSSIBLE |
static java.lang.String |
STR_MANDATORY |
static java.lang.String |
STR_NEVER |
SAVE_RETRIES, SAVE_RETRY_DELAY_MS_MAX, SAVE_RETRY_DELAY_MS_MIN
Constructor and Description |
---|
KernelModule(DBManLocalI _dbm)
Constructor.
|
KernelModule(DBManLocalI _dbm,
int _maxSaveRetries) |
Modifier and Type | Method and Description |
---|---|
BOLoaderI |
getBOLoader()
Returns the BOLoaderI used by this KernelModule.
|
DBManConfigurationHelperI |
getConfiguration()
Convenience method for getting the DBMans
DBManConfigurationHelperI . |
java.sql.Connection |
getConnection() |
DBManLocalI |
getDbm() |
java.sql.Connection |
getJDBCConnection()
Returns a JDBC connection for direct access to the DBManLocalIs underlying
database.
|
CachingBOLoader |
getNewCachingBOLoader()
Returns a newly built
CachingBOLoader for usage in the context of this KernelModule . |
java.lang.Long |
getNodeNumber() |
SchemaI |
getSchema()
Convenience method for getting the current
SchemaI . |
Benutzer |
getUser() |
boolean |
isAuthoritativeSyncServer() |
boolean |
isShutdown() |
BO |
loadBO(java.lang.Long id)
Loads the BO with the given ID.
|
BO |
loadBO(java.lang.Long id,
java.lang.Class<? extends BOI> clazz)
Loads the BO with the given ID.
|
de.ipcon.db.core.QueryResultsI |
query(java.lang.Class clazz) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.Class clazz,
java.lang.String where) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.Class clazz,
java.lang.String where,
java.lang.Object[] pvals) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.Class clazz,
java.lang.String where,
java.lang.Object[] pvals,
boolean includeDeleted) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.Class clazz,
java.lang.String where,
java.lang.Object[] pvals,
boolean includeDeleted,
java.lang.String orderBy) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.String clazzname) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.String clazzname,
java.lang.String where) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.String clazzname,
java.lang.String where,
java.lang.Object[] pvals) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.String clazzname,
java.lang.String where,
java.lang.Object[] pvals,
boolean includeDeleted) |
de.ipcon.db.core.QueryResultsI |
query(java.lang.String clazzname,
java.lang.String where,
java.lang.Object[] pvals,
boolean includeDeleted,
java.lang.String orderBy) |
boolean |
runsAsUser(Benutzer userToCheck)
Returns true if this KernelModule acts as the passed user.
|
SaveResultI |
save(Benutzer differingUser,
java.lang.String desc,
groovy.lang.Closure cl)
Method to save a transaction which is handled by a closure in the parameter.
|
SaveResultI |
save(Benutzer differingUser,
java.lang.String desc,
java.util.function.Consumer<Transaction> fn) |
SaveResultI |
save(Benutzer differingUser,
java.lang.String desc,
java.util.function.Function<Transaction,? extends java.lang.Object> fn) |
SaveResultI |
save(Benutzer differingUser,
java.lang.String desc,
ThrowingFunction<Transaction,? extends java.lang.Object,? extends java.lang.Throwable> fn) |
SaveResultI |
save(groovy.lang.Closure cl)
Wrapper method to call
save(String, Closure) without a description for the transaction. |
SaveResultI |
save(java.util.function.Consumer<Transaction> fn) |
SaveResultI |
save(java.util.function.Function<Transaction,? extends java.lang.Object> fn) |
SaveResultI |
save(java.lang.String desc,
groovy.lang.Closure cl)
Same as
KernelDatabaseSaverI.save(Benutzer, String, Closure) , but without a Benutzer. |
SaveResultI |
save(java.lang.String desc,
java.util.function.Consumer<Transaction> fn) |
SaveResultI |
save(java.lang.String desc,
java.util.function.Function<Transaction,? extends java.lang.Object> fn) |
SaveResultI |
save(java.lang.String desc,
ThrowingFunction<Transaction,? extends java.lang.Object,? extends java.lang.Throwable> fn) |
SaveResultI |
save(ThrowingFunction<Transaction,? extends java.lang.Object,? extends java.lang.Throwable> fn) |
void |
setDbm(DBManLocalI $6) |
void |
setShutdown(boolean $8) |
void |
setUser(Benutzer $7) |
void |
shutdown(int shutdownWaitTimeoutInSecs)
Shuts this module down in a clean fashion, normally called during server
shutdown.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleSaveResultForRetry
wantsConnectionsClosed
public static final org.apache.log4j.Logger log
public static final java.lang.String STR_NEVER
public static final java.lang.String STR_IF_POSSIBLE
public static final java.lang.String STR_MANDATORY
public KernelModule(DBManLocalI _dbm)
_dbm
- the DBManLocalI
instance to use within this KernelModule
public KernelModule(DBManLocalI _dbm, int _maxSaveRetries)
public boolean runsAsUser(Benutzer userToCheck)
public BOLoaderI getBOLoader()
public CachingBOLoader getNewCachingBOLoader()
CachingBOLoader
for usage in the context of this KernelModule
.public void shutdown(int shutdownWaitTimeoutInSecs)
shutdownWaitTimeoutInSecs
- time in seconds the DBMan will wait
at most for this module to perform its shutdownpublic DBManConfigurationHelperI getConfiguration()
DBManConfigurationHelperI
.public SchemaI getSchema()
KernelDatabaseAccessorI
SchemaI
.getSchema
in interface KernelDatabaseAccessorI
SchemaI
.public de.ipcon.db.core.QueryResultsI query(java.lang.Class clazz)
public de.ipcon.db.core.QueryResultsI query(java.lang.Class clazz, java.lang.String where)
public de.ipcon.db.core.QueryResultsI query(java.lang.Class clazz, java.lang.String where, java.lang.Object[] pvals)
public de.ipcon.db.core.QueryResultsI query(java.lang.Class clazz, java.lang.String where, java.lang.Object[] pvals, boolean includeDeleted)
public de.ipcon.db.core.QueryResultsI query(java.lang.Class clazz, java.lang.String where, java.lang.Object[] pvals, boolean includeDeleted, java.lang.String orderBy)
public de.ipcon.db.core.QueryResultsI query(java.lang.String clazzname)
query
in interface KernelDatabaseAccessorI
public de.ipcon.db.core.QueryResultsI query(java.lang.String clazzname, java.lang.String where)
query
in interface KernelDatabaseAccessorI
public de.ipcon.db.core.QueryResultsI query(java.lang.String clazzname, java.lang.String where, java.lang.Object[] pvals)
query
in interface KernelDatabaseAccessorI
public de.ipcon.db.core.QueryResultsI query(java.lang.String clazzname, java.lang.String where, java.lang.Object[] pvals, boolean includeDeleted)
query
in interface KernelDatabaseAccessorI
public de.ipcon.db.core.QueryResultsI query(java.lang.String clazzname, java.lang.String where, java.lang.Object[] pvals, boolean includeDeleted, java.lang.String orderBy)
query
in interface KernelDatabaseAccessorI
public BO loadBO(java.lang.Long id)
KernelDatabaseAccessorI
loadBO
in interface KernelDatabaseAccessorI
id
- the ID of the requested BOpublic BO loadBO(java.lang.Long id, java.lang.Class<? extends BOI> clazz)
KernelDatabaseAccessorI
loadBO
in interface KernelDatabaseAccessorI
id
- the ID of the requested BOclazz
- the Class the requested BO is supposed to be of; can be null.public java.sql.Connection getJDBCConnection()
KernelDatabaseAccessorI
getJDBCConnection
in interface KernelDatabaseAccessorI
null
in case of an errorpublic java.sql.Connection getConnection()
getConnection
in interface DatabaseConnectionProviderI
public boolean isAuthoritativeSyncServer()
isAuthoritativeSyncServer
in interface KernelDatabaseAccessorI
public java.lang.Long getNodeNumber()
getNodeNumber
in interface KernelDatabaseAccessorI
public SaveResultI save(groovy.lang.Closure cl)
KernelDatabaseSaverI
save(String, Closure)
without a description for the transaction.save
in interface KernelDatabaseSaverI
cl
- Closure which manipulates the transactionSaveResult
containing the resulting values of the save-procedure.public SaveResultI save(java.lang.String desc, groovy.lang.Closure cl)
KernelDatabaseSaverI
KernelDatabaseSaverI.save(Benutzer, String, Closure)
, but without a Benutzer.save
in interface KernelDatabaseSaverI
desc
- Description of the transactioncl
- Closure which manipulates the transactionSaveResult
containing the resulting values of the save-procedure.public SaveResultI save(Benutzer differingUser, java.lang.String desc, groovy.lang.Closure cl)
KernelDatabaseSaverI
save
in interface KernelDatabaseSaverI
differingUser
- Benutzer object on whose behalf the transaction shall be saveddesc
- Description of the transactioncl
- Closure which manipulates the transactionSaveResult
containing the resulting values of the save-procedure.public SaveResultI save(java.util.function.Consumer<Transaction> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(java.lang.String desc, java.util.function.Consumer<Transaction> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(Benutzer differingUser, java.lang.String desc, java.util.function.Consumer<Transaction> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(java.util.function.Function<Transaction,? extends java.lang.Object> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(java.lang.String desc, java.util.function.Function<Transaction,? extends java.lang.Object> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(Benutzer differingUser, java.lang.String desc, java.util.function.Function<Transaction,? extends java.lang.Object> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(ThrowingFunction<Transaction,? extends java.lang.Object,? extends java.lang.Throwable> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(java.lang.String desc, ThrowingFunction<Transaction,? extends java.lang.Object,? extends java.lang.Throwable> fn)
save
in interface KernelDatabaseSaverI
public SaveResultI save(Benutzer differingUser, java.lang.String desc, ThrowingFunction<Transaction,? extends java.lang.Object,? extends java.lang.Throwable> fn)
save
in interface KernelDatabaseSaverI
public DBManLocalI getDbm()
public void setDbm(DBManLocalI $6)
public Benutzer getUser()
public void setUser(Benutzer $7)
public boolean isShutdown()
public void setShutdown(boolean $8)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.