Package com.avoka.core.util
Class CayenneRuntimeFactory
- java.lang.Object
-
- com.avoka.core.util.CayenneRuntimeFactory
-
public class CayenneRuntimeFactory extends Object
A factory for creating CayenneRuntime objects.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description CayenneRuntimeFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
clearQueryCacheGroup(String groupName)
Clear server runtime instances query cache group for the given name.org.apache.cayenne.access.DataContext
getDataContext()
Return the data context for the given Cayenne runtime configuration.org.apache.cayenne.configuration.server.ServerRuntime
getServerRuntime()
Return the server runtime for the given Cayenne runtime configuration.CayenneRuntimeFactory
setConfigurationLocation(String configurationLocation)
Set cayenne domain configuration location.CayenneRuntimeFactory
setDataSourceFactory(org.apache.cayenne.configuration.server.DataSourceFactory dataSourceFactory)
Set data source factory to use.CayenneRuntimeFactory
setDefaultListener(org.apache.cayenne.LifecycleListener defaultListener)
Set the default LifecycleListener.CayenneRuntimeFactory
setLifecycleListeners(List lifecycleListeners)
Set the list of LifecycleListeners.CayenneRuntimeFactory
setQueryCache(boolean queryCache)
Set whether to use query caching.
-
-
-
Method Detail
-
setConfigurationLocation
public CayenneRuntimeFactory setConfigurationLocation(String configurationLocation)
Set cayenne domain configuration location.- Parameters:
configurationLocation
- cayenne domain configuration location- Returns:
- this Cayenne runtime factory
- Since:
- 19.5.0
-
setQueryCache
public CayenneRuntimeFactory setQueryCache(boolean queryCache)
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
public CayenneRuntimeFactory setLifecycleListeners(List lifecycleListeners)
Set the list of LifecycleListeners.- Parameters:
lifecycleListeners
- the list of LifecycleListeners- Returns:
- this Cayenne runtime factory
- Since:
- 5.1.7
-
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
public static void clearQueryCacheGroup(String groupName)
Clear server runtime instances query cache group for the given name.- Parameters:
groupName
- the query cache group name (required)- Since:
- 5.1.7
-
-