public interface Speedment
Platform
class acts as a generic holder of different system
Components
. Using its pluggable architecture, one can
replace existing default implementations of existing Components or plug in
custom made implementation of any Interface.
Pluggable instances must implement the Component
interface.
Modifier and Type | Method and Description |
---|---|
Stream<Component> |
components()
Creates and returns a new Stream of all installed Components.
|
Speedment |
copyWithSameTypeOfComponents()
Creates a new speedment instance and loads a new instance of each
component that this speedment instance has.
|
<R extends Component> |
get(Class<R> interfaceClass)
|
default CodeGenerationComponent |
getCodeGenerationComponent() |
default ConnectionPoolComponent |
getConnectionPoolComponent() |
default DbmsHandlerComponent |
getDbmsHandlerComponent() |
default DocumentPropertyComponent |
getDocumentPropertyComponent() |
default EntityManager |
getEntityManager() |
default EventComponent |
getEventComponent() |
default ManagerComponent |
getManagerComponent() |
default PasswordComponent |
getPasswordComponent() |
default PrimaryKeyFactoryComponent |
getPrimaryKeyFactoryComponent() |
default ProjectComponent |
getProjectComponent() |
default ResultSetMapperComponent |
getResultSetMapperComponent() |
default StreamSupplierComponent |
getStreamSupplierComponent() |
default TypeMapperComponent |
getTypeMapperComponent() |
default UserInterfaceComponent |
getUserInterfaceComponent() |
<ENTITY> Manager<ENTITY> |
managerOf(Class<ENTITY> entityClass)
Obtains and returns the currently associated
Manager
implementation for the given Entity interface Class. |
Component |
put(Component item)
Puts a new Component in the Speedment platform and returns the previous
Component (if any) with the same interface class.
|
void |
setLogLevel(com.speedment.internal.logging.Level level)
Sets the log level for this speedment instance.
|
void |
stop()
Stops the Speedment instance and deallocates any allocated resources.
|
<R extends Component> R get(Class<R> interfaceClass)
Speedment
Component
based on its interface class.
The supported standard interfaces types are:
R
- The intended return typeinterfaceClass
- The interface class of the intended return typeComponent put(Component item)
item
- the new Component to put<ENTITY> Manager<ENTITY> managerOf(Class<ENTITY> entityClass) throws SpeedmentException
Manager
implementation for the given Entity interface Class. If no Manager exists
for the given entityClass, a SpeedmentException will be thrown.
N.B.This conveniency method is a pure delegator to the ManagerComponent and is exactly equivalent to the code:
get(ManagerComponent.class).managerOf(entityClass)
ENTITY
- the Entity interface typeentityClass
- the Entity interface Class
Manager
implementation for the
given Entity interface ClassSpeedmentException
- if no Manager exists for the given entityClassStream<Component> components()
void stop()
Speedment copyWithSameTypeOfComponents()
void setLogLevel(com.speedment.internal.logging.Level level)
level
- new log level to usedefault EntityManager getEntityManager()
default DbmsHandlerComponent getDbmsHandlerComponent()
default ManagerComponent getManagerComponent()
default PrimaryKeyFactoryComponent getPrimaryKeyFactoryComponent()
default ProjectComponent getProjectComponent()
default ResultSetMapperComponent getResultSetMapperComponent()
default ConnectionPoolComponent getConnectionPoolComponent()
default StreamSupplierComponent getStreamSupplierComponent()
default TypeMapperComponent getTypeMapperComponent()
default EventComponent getEventComponent()
default UserInterfaceComponent getUserInterfaceComponent()
default PasswordComponent getPasswordComponent()
default CodeGenerationComponent getCodeGenerationComponent()
default DocumentPropertyComponent getDocumentPropertyComponent()
Copyright © 2016 Speedment, Inc.. All rights reserved.