Package oracle.pgx.api.mllib
Class DbModelLoader<ModelType extends Model<?>>
- java.lang.Object
-
- oracle.pgx.api.mllib.ModelLoader<ModelType,DbModelLoader<ModelType>>
-
- oracle.pgx.api.mllib.DbModelLoader<ModelType>
-
public class DbModelLoader<ModelType extends Model<?>> extends ModelLoader<ModelType,DbModelLoader<ModelType>>
A model loader for models stored in an Oracle database, inside a modelstore table.- Since:
- 21.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class oracle.pgx.api.mllib.ModelLoader
ModelLoader.ModelConstructor<LoadedModelType>
-
-
Constructor Summary
Constructors Constructor Description DbModelLoader(PgxSession session, oracle.pgx.api.internal.Core core, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier, ModelKind modelKind, ModelLoader.ModelConstructor<ModelType> constructor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DbModelLoader<ModelType>
dataSourceId(java.lang.String dataSourceId)
Configures the datasource ID (not required if using the user from the realm)DbModelLoader<ModelType>
jdbcUrl(java.lang.String jdbcUrl)
Configures the jdbc url of the database to connect to (not required if using the user from the realm)DbModelLoader<ModelType>
keystoreAlias(java.lang.String keystore)
Configures the keystore alias to get the password for the connectionPgxFuture<ModelType>
loadAsync()
Trigger the load, once all the parameters have been set (async version)DbModelLoader<ModelType>
modelname(java.lang.String modelName)
Configures the name of the model to load in the modelstore tableDbModelLoader<ModelType>
modelstore(java.lang.String modelStoreName)
Configures the name of the modelstore table to load fromDbModelLoader<ModelType>
owner(java.lang.String owner)
Configures the owner of the modelstore table in the databaseDbModelLoader<ModelType>
password(java.lang.String password)
Configures the password of the database user to load the model from (not required if using the user from the realm)DbModelLoader<ModelType>
schema(java.lang.String schema)
Configures the schema in which the modelstore table in the database isDbModelLoader<ModelType>
username(java.lang.String username)
Configures the username of the database user to load the model with (not required if using the user from the realm)-
Methods inherited from class oracle.pgx.api.mllib.ModelLoader
load
-
-
-
-
Constructor Detail
-
DbModelLoader
public DbModelLoader(PgxSession session, oracle.pgx.api.internal.Core core, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier, ModelKind modelKind, ModelLoader.ModelConstructor<ModelType> constructor)
-
-
Method Detail
-
owner
public DbModelLoader<ModelType> owner(java.lang.String owner)
Configures the owner of the modelstore table in the database- Parameters:
owner
- the database owner of the modelstore table- Returns:
- this instance
- Since:
- 21.1
-
schema
public DbModelLoader<ModelType> schema(java.lang.String schema)
Configures the schema in which the modelstore table in the database is- Parameters:
schema
- the schema in which the modelstore table is- Returns:
- this instance
- Since:
- 21.1
-
dataSourceId
public DbModelLoader<ModelType> dataSourceId(java.lang.String dataSourceId)
Configures the datasource ID (not required if using the user from the realm)- Parameters:
dataSourceId
- the datasource ID- Returns:
- this instance
- Since:
- 21.1
-
jdbcUrl
public DbModelLoader<ModelType> jdbcUrl(java.lang.String jdbcUrl)
Configures the jdbc url of the database to connect to (not required if using the user from the realm)- Parameters:
jdbcUrl
- the jdbc url of the database- Returns:
- this instance
- Since:
- 21.1
-
username
public DbModelLoader<ModelType> username(java.lang.String username)
Configures the username of the database user to load the model with (not required if using the user from the realm)- Parameters:
username
- the database username- Returns:
- this instance
- Since:
- 21.1
-
password
public DbModelLoader<ModelType> password(java.lang.String password)
Configures the password of the database user to load the model from (not required if using the user from the realm)- Parameters:
password
- the password of the database user- Returns:
- this instance
- Since:
- 21.1
-
keystoreAlias
public DbModelLoader<ModelType> keystoreAlias(java.lang.String keystore)
Configures the keystore alias to get the password for the connection- Parameters:
keystore
- the keystore alias- Returns:
- this instance
- Since:
- 21.1
-
modelstore
public DbModelLoader<ModelType> modelstore(java.lang.String modelStoreName)
Configures the name of the modelstore table to load from- Parameters:
modelStoreName
- the name of the modelstore table to load from- Returns:
- this instance
- Since:
- 21.1
-
modelname
public DbModelLoader<ModelType> modelname(java.lang.String modelName)
Configures the name of the model to load in the modelstore table- Parameters:
modelName
- the name of the model to load- Returns:
- this instance
- Since:
- 21.1
-
loadAsync
public PgxFuture<ModelType> loadAsync()
Description copied from class:ModelLoader
Trigger the load, once all the parameters have been set (async version)- Specified by:
loadAsync
in classModelLoader<ModelType extends Model<?>,DbModelLoader<ModelType extends Model<?>>>
- Returns:
- future to the loaded model
-
-