Package com.avoka.core.util
Class CayenneRuntimeFactory
java.lang.Object
com.avoka.core.util.CayenneRuntimeFactory
A factory for creating CayenneRuntime objects.
- Since:
- 4.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clearQueryCacheGroup
(String groupName) Clear server runtime instances query cache group for the given name.org.apache.cayenne.access.DataContext
Return the data context for the given Cayenne runtime configuration.org.apache.cayenne.configuration.server.ServerRuntime
Return the server runtime for the given Cayenne runtime configuration.setCommitLogModule
(org.apache.cayenne.di.Module commitLogModule) Set the commit log modulesetConfigurationLocation
(String configurationLocation) Set cayenne domain configuration location.setDataSourceFactory
(org.apache.cayenne.configuration.server.DataSourceFactory dataSourceFactory) Set data source factory to use.setDefaultListener
(org.apache.cayenne.LifecycleListener defaultListener) Set the default LifecycleListener.setLifecycleListeners
(List lifecycleListeners) Set the list of LifecycleListeners.setQueryCache
(boolean queryCache) Set whether to use query caching.
-
Constructor Details
-
CayenneRuntimeFactory
public CayenneRuntimeFactory() -
CayenneRuntimeFactory
public CayenneRuntimeFactory(boolean commitLogModuleFlag)
-
-
Method Details
-
setConfigurationLocation
Set cayenne domain configuration location.- Parameters:
configurationLocation
- cayenne domain configuration location- Returns:
- this Cayenne runtime factory
- Since:
- 19.5.0
-
setQueryCache
Set whether to use query caching.- Parameters:
queryCache
- specify whether to use query caching- Returns:
- this Cayenne runtime factory
- Since:
- 5.1.7
-
setDataSourceFactory
public CayenneRuntimeFactory setDataSourceFactory(org.apache.cayenne.configuration.server.DataSourceFactory dataSourceFactory) Set data source factory to use.- Parameters:
dataSourceFactory
- the data source factory to use.- Returns:
- this Cayenne runtime factory
- Since:
- 5.1.7
-
setDefaultListener
public CayenneRuntimeFactory setDefaultListener(org.apache.cayenne.LifecycleListener defaultListener) Set the default LifecycleListener.- Parameters:
defaultListener
- specify whether to use query caching- Returns:
- this Cayenne runtime factory
- Since:
- 5.1.7
-
setLifecycleListeners
Set the list of LifecycleListeners.- Parameters:
lifecycleListeners
- the list of LifecycleListeners- Returns:
- this Cayenne runtime factory
- Since:
- 5.1.7
-
setCommitLogModule
Set the commit log module- Parameters:
commitLogModule
- the commit log module- Returns:
- this Cayenne runtime factory
- Since:
- 22.10.0
-
getServerRuntime
public org.apache.cayenne.configuration.server.ServerRuntime getServerRuntime()Return the server runtime for the given Cayenne runtime configuration.- Returns:
- the server runtime for the given Cayenne runtime configuration
- Since:
- 5.1.7
-
getDataContext
public org.apache.cayenne.access.DataContext getDataContext()Return the data context for the given Cayenne runtime configuration.- Returns:
- the data context for the given Cayenne runtime configuration
- Since:
- 5.1.7
-
clearQueryCacheGroup
Clear server runtime instances query cache group for the given name.- Parameters:
groupName
- the query cache group name (required)- Since:
- 5.1.7
-