Package de.espirit.or
Interface Layer
public interface Layer
Definition of a type providing information about a database layer.
- Since:
- 4.0.17
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumIsolation level, seeConnection.setTransactionIsolation(int). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault maximum pool size.static final intDefault maximum length for strings.static final intDefault minimum pool size.static final longDefault check interval for pool access.static final longDefault timeout for pool access.static final StringProperty name for storing the JDBC catalog name.static final StringProperty name for storing the check statement.static final StringProperty name for storing the timout for connection response.static final StringProperty name for storing the time to pause before retry when a connection error occurred.static final StringProperty name for storing the number of retries when a connection error occurred.static final StringProperty name for storing the JDBC driver.static final StringMaximum time to wait on a connection becoming available.static final StringProperty for transaction isolation, supported values are READ_COMMITTED, REPEATABLE_READ, and SERIALIZABLE.static final StringProperty name for storing the JDBC JNDI definition.static final StringProperty name for storing the layer class.static final StringProperty name for storing the maximum pool size.static final StringProperty name for storing the maximum length for strings.static final StringProperty name for storing the minimum pool size.static final StringProperty name for storing the user's password.static final StringProperty name for storing the interval in which to check the pool constraints.static final StringProperty name for storing the timeout for pool access.static final StringProperty name for storing the JDBC schema name.static final StringProperty name for storing the JDBC URL.static final StringProperty name for storing the user. -
Method Summary
Modifier and TypeMethodDescriptionConverts the given configuration to a map of properties.convertConfiguration(Map<String, String> properties) Converts the given properties toa configuration object.de.espirit.or.CounterGeneratorcreateIdGenerator(String schemaName, boolean useLowerCase, de.espirit.or.ConnectionManager connectionManager) Create a new id generator for this layer.de.espirit.or.SchemaSynchronizerCreates a schema synchronizer.@NotNull CaseModeProvides the mode for letter case handling.@NotNull CaseModeCase mode for database name.Return the catalog (database) assigned with this layer.getDefaultParameters(@NotNull String name) Return a map of jdbc parameters to default values for this layer based onname.@NotNull Layer.TransactionIsolationLevelGet the default isolation level of this layer.default StringGet the specific SQL-Drop-Statement which deletes an existing table or scheme from a databasegetId()Provides the ID of the layer.intgetJdbcTypeCode(de.espirit.or.schema.Column column) Provides the JDBC defined type code for the given column type.getProperty(String name) Provides the property value stored with the given name.Return the database schema assigned with this Multiproject-Layer layer.de.espirit.or.SQLBuilderProvides a builder for SQL requests.charThe character to delimit string constants in sql expressions.voidInitializes the layer with the given properties.@Nullable StringtestLayerParameters(ConnectionConfiguration config, ClassLoader classLoader) Tests the given configuration for this layer.
-
Field Details
-
PROP_LAYERCLASS
Property name for storing the layer class.- Since:
- 4.0.17
- See Also:
-
PROP_USER
Property name for storing the user.- Since:
- 4.0.17
- See Also:
-
PROP_PASSWORD
Property name for storing the user's password.- Since:
- 4.0.17
- See Also:
-
PROP_CHECK_STATEMENT
Property name for storing the check statement.- Since:
- 4.0.17
- See Also:
-
PROP_MIN_POOL_SIZE
Property name for storing the minimum pool size.- Since:
- 4.0.17
- See Also:
-
PROP_MAX_POOL_SIZE
Property name for storing the maximum pool size.- Since:
- 4.0.17
- See Also:
-
PROP_POOL_CHECK_INTERVAL
Property name for storing the interval in which to check the pool constraints.- Since:
- 4.0.17
- See Also:
-
PROP_POOL_TIMEOUT
Property name for storing the timeout for pool access.- Since:
- 4.0.17
- See Also:
-
PROP_CONNECTION_TIMEOUT
Property name for storing the timout for connection response.- Since:
- 4.0.17
- See Also:
-
PROP_DRIVER
Property name for storing the JDBC driver.- Since:
- 4.0.17
- See Also:
-
PROP_SCHEMA
Property name for storing the JDBC schema name.- Since:
- 4.0.17
- See Also:
-
PROP_CREATE_RETRY_ON_ERROR
Property name for storing the number of retries when a connection error occurred.- Since:
- 4.0.17
- See Also:
-
PROP_CREATE_PAUSE_ON_ERROR
Property name for storing the time to pause before retry when a connection error occurred.- Since:
- 4.0.17
- See Also:
-
PROP_FETCH_CONNECTION_TIMEOUT
Maximum time to wait on a connection becoming available.- Since:
- 5.1.500
- See Also:
-
PROP_URL
Property name for storing the JDBC URL.- Since:
- 4.0.17
- See Also:
-
PROP_JNDI
Property name for storing the JDBC JNDI definition.- Since:
- 4.0.17
- See Also:
-
PROP_MAX_STRING_LENGTH
Property name for storing the maximum length for strings.- Since:
- 4.0.19
- See Also:
-
PROP_CATALOG
Property name for storing the JDBC catalog name.- Since:
- 4.0.19
- See Also:
-
DEF_MAX_STRING_LENGTH
static final int DEF_MAX_STRING_LENGTHDefault maximum length for strings.- Since:
- 4.0.19
- See Also:
-
DEF_MAX_POOL_SIZE
static final int DEF_MAX_POOL_SIZEDefault maximum pool size.- Since:
- 4.0.19
- See Also:
-
DEF_MIN_POOL_SIZE
static final int DEF_MIN_POOL_SIZEDefault minimum pool size.- Since:
- 4.0.19
- See Also:
-
DEF_POOL_CHECK_INTERVAL
static final long DEF_POOL_CHECK_INTERVALDefault check interval for pool access.- Since:
- 4.0.19
- See Also:
-
DEF_POOL_TIMEOUT
static final long DEF_POOL_TIMEOUTDefault timeout for pool access.- Since:
- 4.0.19
- See Also:
-
PROP_ISOLATION
Property for transaction isolation, supported values are READ_COMMITTED, REPEATABLE_READ, and SERIALIZABLE. Default is SERIALIZABLE.- Since:
- 5.0.100
- See Also:
-
-
Method Details
-
getId
String getId()Provides the ID of the layer.- Returns:
- The ID.
- Since:
- 4.0.17
-
init
Initializes the layer with the given properties.- Parameters:
props- Some properties.- Since:
- 4.0.17
-
createSchemaSynchronizer
de.espirit.or.SchemaSynchronizer createSchemaSynchronizer()Creates a schema synchronizer.- Returns:
- A synchronizer.
- Since:
- 4.0.17
-
getSQLBuilder
de.espirit.or.SQLBuilder getSQLBuilder()Provides a builder for SQL requests.- Returns:
- An SQL builder.
- Since:
- 4.0.17
-
getCatalog
String getCatalog()Return the catalog (database) assigned with this layer.- Since:
- 4.0.17
-
getSchema
String getSchema()Return the database schema assigned with this Multiproject-Layer layer.- Since:
- 4.0.17
-
getCaseMode
Provides the mode for letter case handling.- Returns:
- The letter case mode.
- Since:
- 4.1.11
-
getCaseModeForDbName
Case mode for database name.- Returns:
- Case mode for database name.
- Since:
- 5.0.100
-
createIdGenerator
de.espirit.or.CounterGenerator createIdGenerator(String schemaName, boolean useLowerCase, de.espirit.or.ConnectionManager connectionManager) Create a new id generator for this layer.- Since:
- 4.0.17
-
getDefaultParameters
Return a map of jdbc parameters to default values for this layer based onname.- Parameters:
name- the name of this layer instance.- Since:
- 4.0.17
-
testLayerParameters
@Nullable @Nullable String testLayerParameters(ConnectionConfiguration config, ClassLoader classLoader) Tests the given configuration for this layer.- Parameters:
config- The configuration.classLoader- A class loader.- Returns:
- An error message or
null. - Since:
- 4.1.9
-
convertConfiguration
Converts the given configuration to a map of properties.- Parameters:
config- The configuration.- Returns:
- A map of properties.
- Since:
- 4.0.17
-
convertConfiguration
Converts the given properties toa configuration object.- Parameters:
properties- A map of properties.- Returns:
- The configuration.
- Since:
- 4.0.17
-
getJdbcTypeCode
int getJdbcTypeCode(de.espirit.or.schema.Column column) Provides the JDBC defined type code for the given column type.- Parameters:
column- The column type.- Returns:
- The JDBC type code.
- Since:
- 4.0.120
-
getProperty
Provides the property value stored with the given name.- Returns:
- The property value or
null. - Since:
- 4.1.1
-
getStringDelimiter
char getStringDelimiter()The character to delimit string constants in sql expressions.- Returns:
- The character used to delimit strings, usually a tic
'. - Since:
- 4.2.209
-
getDefaultTransactionIsolationLevel
Get the default isolation level of this layer.- Returns:
- The default isolation level for this Layer (not
null). - Since:
- 5.1.309
-
getDropStatement
Get the specific SQL-Drop-Statement which deletes an existing table or scheme from a database- Returns:
- The drop-statement as
Stringvalue - Since:
- 5.2.210903
-