Module is.codion.framework.db.core
Package is.codion.framework.db
Interface EntityConnection.Builder<T extends EntityConnection,B extends EntityConnection.Builder<T,B>>
- Type Parameters:
T- the connection typeB- the builder type
- All Known Subinterfaces:
HttpEntityConnection.Builder,LocalEntityConnection.Builder,RemoteEntityConnection.Builder
- All Known Implementing Classes:
AbstractEntityConnection.AbstractBuilder,DefaultHttpEntityConnectionBuilder,DefaultLocalEntityConnectionBuilder,DefaultRemoteEntityConnectionBuilder
- Enclosing interface:
EntityConnection
public static interface EntityConnection.Builder<T extends EntityConnection,B extends EntityConnection.Builder<T,B>>
Builds a self-managing
EntityConnection.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()clientType(String clientType) If no client type is specified,DomainType.name()is used.clientVersion(@Nullable Version clientVersion) Sets the domain by instance.domain(DomainType domain) boolean
-
Method Details
-
supports
- Parameters:
connectionType- the connection type- Returns:
- true if this builder supports the given connection type, e.g. "local", "remote" or "http"
-
user
- Parameters:
user- the user- Returns:
- this builder instance
-
domain
- Parameters:
domain- the domain type to base this connection on- Returns:
- this builder instance
-
domain
Sets the domain by instance. Connections which run the domain in-process (a local connection for example) use the given instance directly, instead of resolving one viaServiceLoaderfrom itsDomain.type(); other connections use only itsDomain.type().- Parameters:
domain- the domain instance to base this connection on- Returns:
- this builder instance
- See Also:
-
clientId
- Parameters:
clientId- the UUID identifying this client connection- Returns:
- this builder instance
-
clientType
If no client type is specified,DomainType.name()is used.- Parameters:
clientType- a String identifying the client type for this connection- Returns:
- this builder instance
- See Also:
-
clientVersion
- Parameters:
clientVersion- the client version- Returns:
- this builder instance
-
build
T build()- Returns:
- a new
EntityConnectioninstance
-