Package com.redwood.scheduler.api.model
Interface Database
-
- All Superinterfaces:
ApplicationObject
,BusinessKeyObject
,NamedRootObject
,NamedRootObjectComp
,PartitionableObject
,PartitionableObjectComp
,Readable
,Root
,SchedulerEntity
,SchedulerEntityComp
,UniqueNamedApplicationObject
public interface Database extends UniqueNamedApplicationObject, Readable
Stores the configuration for a Database object, these are used to provide settings for the Redwood JDBC pool. Stores the configuration for a Database object, these are used to provide settings for the Redwood JDBC pool.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_REFERENCE_NAME_JDBC_PROCESSSERVER
Name of the Object Reference referring from a Jdbc ProcessServer to the Database Object where its database configuration is storedstatic String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Database" objects.static String
SEC_PRIV_CREATE
This privilege can be granted at a group level.static String
SEC_PRIV_DELETE
This privilege can be granted at a group level.static String
SEC_PRIV_EDIT
This privilege can be granted at a group level.static String
SEC_PRIV_VIEW
This privilege can be granted at a group level.static String
SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , deletestatic String
SEC_RANK_CREATE
This rank is made of the following privileges: createstatic String
SEC_RANK_DELETE
This rank is made of the following privileges: create , view , deletestatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , editstatic String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
SEC_RANK_VIEW
This rank is made of the following privileges: viewstatic QueryObjectType<Database>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description RequiredPermission
checkCreatePrivilege()
Check whether or not the create action can be performed on this object.RequiredPermission
checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.RequiredPermission
checkEditPrivilege()
Check whether or not the edit action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.DatabaseConnection
connect(Credential credential)
Connect to the database using a credential.DatabaseConnectionBuilder
createDatabaseConnectionBuilder()
Create a DatabaseConnectionBuilder for this database.static Database
from(ProcessServer processServer)
Return Database from ProcessServer.AutoCommitStyle
getAutoCommitStyle()
Get the value for AutoCommitStyle.Properties
getDriverProperiesAsProperties()
Return the driver properties, if any, as Properties object.String
getDriverProperties()
Get the value for DriverProperties.String
getFrequentUsers()
Get the value for FrequentUsers.List<String>
getFrequentUsersAsList()
Return the frequent users, if any, as List<String>.String
getInitializationQuery()
Get the value for InitializationQuery.String
getInvalidUserNameOrPasswordSQLExceptions()
Get the value for InvalidUserNameOrPasswordSQLExceptions.String
getJdbcDriverClassName()
Get the value for JdbcDriverClassName.String
getJdbcUrl()
Get the value for JdbcUrl.String
getJdbcUserName()
Get the value for JdbcUserName.Library
getLibrary()
Get the Library.Long
getMaxAbandonedTime()
Get the value for MaxAbandonedTime.Long
getMaxConnectTime()
Get the value for MaxConnectTime.Long
getMaxIdleTime()
Get the value for MaxIdleTime.Long
getMaxNumberOfConnections()
Get the value for MaxNumberOfConnections.Long
getMaxNumberOfConnectionsPerFrequentUser()
Get the value for MaxNumberOfConnectionsPerFrequentUser.Long
getMaxNumberOfConnectionsPerSporadicUser()
Get the value for MaxNumberOfConnectionsPerSporadicUser.Long
getMinNumberOfIdleConnectionsPerFrequentUser()
Get the value for MinNumberOfIdleConnectionsPerFrequentUser.String
getNonTransientConnectSQLExceptions()
Get the value for NonTransientConnectSQLExceptions.JdbcConnectionPoolingState
getPoolingState()
Get the value for PoolingState.String
getSevereSQLExceptions()
Get the value for SevereSQLExceptions.String
getValidationQuery()
Get the value for ValidationQuery.void
setAutoCommitStyle(AutoCommitStyle newAutoCommitStyle)
Set the value for AutoCommitStyle.void
setDriverProperties(String newDriverProperties)
Set the value for DriverProperties.void
setFrequentUsers(String newFrequentUsers)
Set the value for FrequentUsers.void
setInitializationQuery(String newInitializationQuery)
Set the value for InitializationQuery.void
setInvalidUserNameOrPasswordSQLExceptions(String newInvalidUserNameOrPasswordSQLExceptions)
Set the value for InvalidUserNameOrPasswordSQLExceptions.void
setJdbcDriverClassName(String newJdbcDriverClassName)
Set the value for JdbcDriverClassName.void
setJdbcUrl(String newJdbcUrl)
Set the value for JdbcUrl.void
setJdbcUserName(String newJdbcUserName)
Set the value for JdbcUserName.void
setLibrary(Library newLibrary)
Set the value for Library.void
setMaxAbandonedTime(Long newMaxAbandonedTime)
Set the value for MaxAbandonedTime.void
setMaxConnectTime(Long newMaxConnectTime)
Set the value for MaxConnectTime.void
setMaxIdleTime(Long newMaxIdleTime)
Set the value for MaxIdleTime.void
setMaxNumberOfConnections(Long newMaxNumberOfConnections)
Set the value for MaxNumberOfConnections.void
setMaxNumberOfConnectionsPerFrequentUser(Long newMaxNumberOfConnectionsPerFrequentUser)
Set the value for MaxNumberOfConnectionsPerFrequentUser.void
setMaxNumberOfConnectionsPerSporadicUser(Long newMaxNumberOfConnectionsPerSporadicUser)
Set the value for MaxNumberOfConnectionsPerSporadicUser.void
setMinNumberOfIdleConnectionsPerFrequentUser(Long newMinNumberOfIdleConnectionsPerFrequentUser)
Set the value for MinNumberOfIdleConnectionsPerFrequentUser.void
setNonTransientConnectSQLExceptions(String newNonTransientConnectSQLExceptions)
Set the value for NonTransientConnectSQLExceptions.void
setPoolingState(JdbcConnectionPoolingState newPoolingState)
Set the value for PoolingState.void
setSevereSQLExceptions(String newSevereSQLExceptions)
Set the value for SevereSQLExceptions.void
setValidationQuery(String newValidationQuery)
Set the value for ValidationQuery.-
Methods inherited from interface com.redwood.scheduler.api.model.ApplicationObject
getParentApplication, setParentApplication
-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.NamedRootObject
createObjectReference, getComment, getDescription, getLinkedObjectReferenceByLinkedObject, getLinkedObjectReferenceByName, getLinkedObjectReferences, getName, getSearchName, getSourceObjectReferences, isHidden, setComment, setDescription, setName
-
Methods inherited from interface com.redwood.scheduler.api.model.PartitionableObject
createObjectTag, getEditablePartitions, getObjectTagByObjectTagDefinition, getObjectTags, getPartition, setPartition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Database" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<Database> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
OBJECT_REFERENCE_NAME_JDBC_PROCESSSERVER
static final String OBJECT_REFERENCE_NAME_JDBC_PROCESSSERVER
Name of the Object Reference referring from a Jdbc ProcessServer to the Database Object where its database configuration is stored- See Also:
- Constant Field Values
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
SEC_PRIV_VIEW
static final String SEC_PRIV_VIEW
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_EDIT
static final String SEC_PRIV_EDIT
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_DELETE
static final String SEC_PRIV_DELETE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_CREATE
static final String SEC_RANK_CREATE
This rank is made of the following privileges: create- See Also:
- Constant Field Values
-
SEC_RANK_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- See Also:
- Constant Field Values
-
SEC_RANK_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , view , edit- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , view , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , delete- See Also:
- Constant Field Values
-
-
Method Detail
-
getJdbcUrl
String getJdbcUrl()
Get the value for JdbcUrl. (The jdbc url to the database) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getJdbcUserName
String getJdbcUserName()
Get the value for JdbcUserName. (The jdbc user name for the database used to check connections are valid.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getJdbcDriverClassName
String getJdbcDriverClassName()
Get the value for JdbcDriverClassName. (The driver class to use) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDriverProperties
String getDriverProperties()
Get the value for DriverProperties. (The optional driver properties, they must be passed in as property=value, each one on a new line.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getInitializationQuery
String getInitializationQuery()
Get the value for InitializationQuery. (The optional initialization query that is executed when a connection is opened.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getValidationQuery
String getValidationQuery()
Get the value for ValidationQuery. (The optional validation query that is executed to see if a connection is valid, before it is returned to the caller.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getPoolingState
JdbcConnectionPoolingState getPoolingState()
Get the value for PoolingState. (The pooling state to use.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getFrequentUsers
String getFrequentUsers()
Get the value for FrequentUsers. (You can optionally specify frequent users separated by a comma.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMaxAbandonedTime
Long getMaxAbandonedTime()
Get the value for MaxAbandonedTime. (The optional value to specify the maximum time before an open, unused connection, is abandoned. Time is in milliseconds.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMaxConnectTime
Long getMaxConnectTime()
Get the value for MaxConnectTime. (The optional value to specify the maximum time to connect (open a connection) before this fails. Time is in milliseconds.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMaxIdleTime
Long getMaxIdleTime()
Get the value for MaxIdleTime. (The optional value to specify the maximum time a connection is allowed to idle (remains in the pool, but no-one requests it). Time is in milliseconds.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMaxNumberOfConnections
Long getMaxNumberOfConnections()
Get the value for MaxNumberOfConnections. (The optional value to specify the maximum number of connections for the pool.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMaxNumberOfConnectionsPerFrequentUser
Long getMaxNumberOfConnectionsPerFrequentUser()
Get the value for MaxNumberOfConnectionsPerFrequentUser. (The optional value to specify the maximum number of connections to use for the frequent users.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMaxNumberOfConnectionsPerSporadicUser
Long getMaxNumberOfConnectionsPerSporadicUser()
Get the value for MaxNumberOfConnectionsPerSporadicUser. (The optional value to specify the maximum number of connections to use for sporadic users.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMinNumberOfIdleConnectionsPerFrequentUser
Long getMinNumberOfIdleConnectionsPerFrequentUser()
Get the value for MinNumberOfIdleConnectionsPerFrequentUser. (The optional value to specify the minimum of idle connections to be available to use for the frequent users.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getSevereSQLExceptions
String getSevereSQLExceptions()
Get the value for SevereSQLExceptions. (Optionally specify severe error codes and/or error states that can occur in your database, separated by comma. If these occur for your database they will be treated as fatal exceptions. Please only set when Redwood Support asks you to.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getNonTransientConnectSQLExceptions
String getNonTransientConnectSQLExceptions()
Get the value for NonTransientConnectSQLExceptions. (Optionally specify non-transient error codes and/or error states that can occur in your database, separated by comma. If these occur during e.g. queries, they are treated as non-transient and will not be repeated (the statement will fail). Please only set when Redwood Support asks you to.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getInvalidUserNameOrPasswordSQLExceptions
String getInvalidUserNameOrPasswordSQLExceptions()
Get the value for InvalidUserNameOrPasswordSQLExceptions. (Optionally specify error codes and/or error states that can occur in your database when a login to is is incorrect, separated by comma. If these occur for your database they will be treated as login failure exceptions.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAutoCommitStyle
AutoCommitStyle getAutoCommitStyle()
Get the value for AutoCommitStyle. (Enable or Disable the default setting for auto commit the database connection. Default auto commit is set to Transaction Based, which means that a commit is done at the end of the job.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setJdbcUrl
void setJdbcUrl(String newJdbcUrl)
Set the value for JdbcUrl. (The jdbc url to the database) This value is mandatory.- Parameters:
newJdbcUrl
- the new value for JdbcUrl. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setJdbcUserName
void setJdbcUserName(String newJdbcUserName)
Set the value for JdbcUserName. (The jdbc user name for the database used to check connections are valid.) This value is optional.- Parameters:
newJdbcUserName
- the new value for JdbcUserName.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setJdbcDriverClassName
void setJdbcDriverClassName(String newJdbcDriverClassName)
Set the value for JdbcDriverClassName. (The driver class to use) This value is mandatory.- Parameters:
newJdbcDriverClassName
- the new value for JdbcDriverClassName. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDriverProperties
void setDriverProperties(String newDriverProperties)
Set the value for DriverProperties. (The optional driver properties, they must be passed in as property=value, each one on a new line.) This value is optional.- Parameters:
newDriverProperties
- the new value for DriverProperties.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setInitializationQuery
void setInitializationQuery(String newInitializationQuery)
Set the value for InitializationQuery. (The optional initialization query that is executed when a connection is opened.) This value is optional.- Parameters:
newInitializationQuery
- the new value for InitializationQuery.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setValidationQuery
void setValidationQuery(String newValidationQuery)
Set the value for ValidationQuery. (The optional validation query that is executed to see if a connection is valid, before it is returned to the caller.) This value is optional.- Parameters:
newValidationQuery
- the new value for ValidationQuery.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setPoolingState
void setPoolingState(JdbcConnectionPoolingState newPoolingState)
Set the value for PoolingState. (The pooling state to use.) This value is mandatory.- Parameters:
newPoolingState
- the new value for PoolingState. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setFrequentUsers
void setFrequentUsers(String newFrequentUsers)
Set the value for FrequentUsers. (You can optionally specify frequent users separated by a comma.) This value is optional.- Parameters:
newFrequentUsers
- the new value for FrequentUsers.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMaxAbandonedTime
void setMaxAbandonedTime(Long newMaxAbandonedTime)
Set the value for MaxAbandonedTime. (The optional value to specify the maximum time before an open, unused connection, is abandoned. Time is in milliseconds.) This value is optional.- Parameters:
newMaxAbandonedTime
- the new value for MaxAbandonedTime.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMaxConnectTime
void setMaxConnectTime(Long newMaxConnectTime)
Set the value for MaxConnectTime. (The optional value to specify the maximum time to connect (open a connection) before this fails. Time is in milliseconds.) This value is optional.- Parameters:
newMaxConnectTime
- the new value for MaxConnectTime.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMaxIdleTime
void setMaxIdleTime(Long newMaxIdleTime)
Set the value for MaxIdleTime. (The optional value to specify the maximum time a connection is allowed to idle (remains in the pool, but no-one requests it). Time is in milliseconds.) This value is optional.- Parameters:
newMaxIdleTime
- the new value for MaxIdleTime.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMaxNumberOfConnections
void setMaxNumberOfConnections(Long newMaxNumberOfConnections)
Set the value for MaxNumberOfConnections. (The optional value to specify the maximum number of connections for the pool.) This value is optional.- Parameters:
newMaxNumberOfConnections
- the new value for MaxNumberOfConnections.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMaxNumberOfConnectionsPerFrequentUser
void setMaxNumberOfConnectionsPerFrequentUser(Long newMaxNumberOfConnectionsPerFrequentUser)
Set the value for MaxNumberOfConnectionsPerFrequentUser. (The optional value to specify the maximum number of connections to use for the frequent users.) This value is optional.- Parameters:
newMaxNumberOfConnectionsPerFrequentUser
- the new value for MaxNumberOfConnectionsPerFrequentUser.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMaxNumberOfConnectionsPerSporadicUser
void setMaxNumberOfConnectionsPerSporadicUser(Long newMaxNumberOfConnectionsPerSporadicUser)
Set the value for MaxNumberOfConnectionsPerSporadicUser. (The optional value to specify the maximum number of connections to use for sporadic users.) This value is optional.- Parameters:
newMaxNumberOfConnectionsPerSporadicUser
- the new value for MaxNumberOfConnectionsPerSporadicUser.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMinNumberOfIdleConnectionsPerFrequentUser
void setMinNumberOfIdleConnectionsPerFrequentUser(Long newMinNumberOfIdleConnectionsPerFrequentUser)
Set the value for MinNumberOfIdleConnectionsPerFrequentUser. (The optional value to specify the minimum of idle connections to be available to use for the frequent users.) This value is optional.- Parameters:
newMinNumberOfIdleConnectionsPerFrequentUser
- the new value for MinNumberOfIdleConnectionsPerFrequentUser.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setSevereSQLExceptions
void setSevereSQLExceptions(String newSevereSQLExceptions)
Set the value for SevereSQLExceptions. (Optionally specify severe error codes and/or error states that can occur in your database, separated by comma. If these occur for your database they will be treated as fatal exceptions. Please only set when Redwood Support asks you to.) This value is optional.- Parameters:
newSevereSQLExceptions
- the new value for SevereSQLExceptions.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setNonTransientConnectSQLExceptions
void setNonTransientConnectSQLExceptions(String newNonTransientConnectSQLExceptions)
Set the value for NonTransientConnectSQLExceptions. (Optionally specify non-transient error codes and/or error states that can occur in your database, separated by comma. If these occur during e.g. queries, they are treated as non-transient and will not be repeated (the statement will fail). Please only set when Redwood Support asks you to.) This value is optional.- Parameters:
newNonTransientConnectSQLExceptions
- the new value for NonTransientConnectSQLExceptions.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setInvalidUserNameOrPasswordSQLExceptions
void setInvalidUserNameOrPasswordSQLExceptions(String newInvalidUserNameOrPasswordSQLExceptions)
Set the value for InvalidUserNameOrPasswordSQLExceptions. (Optionally specify error codes and/or error states that can occur in your database when a login to is is incorrect, separated by comma. If these occur for your database they will be treated as login failure exceptions.) This value is optional.- Parameters:
newInvalidUserNameOrPasswordSQLExceptions
- the new value for InvalidUserNameOrPasswordSQLExceptions.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setAutoCommitStyle
void setAutoCommitStyle(AutoCommitStyle newAutoCommitStyle)
Set the value for AutoCommitStyle. (Enable or Disable the default setting for auto commit the database connection. Default auto commit is set to Transaction Based, which means that a commit is done at the end of the job.) This value is mandatory.- Parameters:
newAutoCommitStyle
- the new value for AutoCommitStyle. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getFrequentUsersAsList
List<String> getFrequentUsersAsList()
Return the frequent users, if any, as List<String>. If none are present returns an empty list.- Returns:
- Return a List<String> of frequent users, empty List if none.
-
getDriverProperiesAsProperties
Properties getDriverProperiesAsProperties()
Return the driver properties, if any, as Properties object. If none are present returns an empty Properties object.- Returns:
- Return a Properties object for the driver properties, if any. Empty Properties object otherwise.
-
connect
DatabaseConnection connect(Credential credential) throws SQLException, com.redwood.scheduler.api.exception.LicenseException
Connect to the database using a credential.- Parameters:
credential
- The (JDBC) credentials to use to connect to the database.- Returns:
- A database connection.
- Throws:
SQLException
com.redwood.scheduler.api.exception.LicenseException
- License violation.- See Also:
for an example
-
createDatabaseConnectionBuilder
DatabaseConnectionBuilder createDatabaseConnectionBuilder() throws SQLException, com.redwood.scheduler.api.exception.LicenseException
Create a DatabaseConnectionBuilder for this database.- Returns:
- A DatabaseConnectionBuilder, which can be used to eventually create a DatabaseConnection, but with the option to specify some options first.
- Throws:
SQLException
com.redwood.scheduler.api.exception.LicenseException
- License violation.- See Also:
for an example
-
from
static Database from(ProcessServer processServer)
Return Database from ProcessServer. Helper to get to database attached to process server- Parameters:
processServer
- The process server to retrieve database from.- Returns:
- Get database from process server, can return null.
-
getLibrary
Library getLibrary()
Get the Library.- Returns:
- Library
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
setLibrary
void setLibrary(Library newLibrary)
Set the value for Library. This value is optional.- Parameters:
newLibrary
- is the object to set Library to. The library that the Database object uses to locate the driver in.
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkViewPrivilege
RequiredPermission checkViewPrivilege()
Check whether or not the view action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkEditPrivilege
RequiredPermission checkEditPrivilege()
Check whether or not the edit action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkDeletePrivilege
RequiredPermission checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-