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 StringOBJECT_REFERENCE_NAME_JDBC_PROCESSSERVERName of the Object Reference referring from a Jdbc ProcessServer to the Database Object where its database configuration is storedstatic StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "Database" objects.static StringSEC_PRIV_CREATEThis privilege can be granted at a group level.static StringSEC_PRIV_DELETEThis privilege can be granted at a group level.static StringSEC_PRIV_EDITThis privilege can be granted at a group level.static StringSEC_PRIV_VIEWThis privilege can be granted at a group level.static StringSEC_RANK_ALLThis rank is made of the following privileges: create , view , edit , deletestatic StringSEC_RANK_CREATEThis rank is made of the following privileges: createstatic StringSEC_RANK_DELETEThis rank is made of the following privileges: create , view , deletestatic StringSEC_RANK_EDITThis rank is made of the following privileges: create , view , editstatic StringSEC_RANK_NONEThis rank has no privileges assigned to it.static StringSEC_RANK_VIEWThis rank is made of the following privileges: viewstatic QueryObjectType<Database>TYPEType 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 RequiredPermissioncheckCreatePrivilege()Check whether or not the create action can be performed on this object.RequiredPermissioncheckDeletePrivilege()Check whether or not the delete action can be performed on this object.RequiredPermissioncheckEditPrivilege()Check whether or not the edit action can be performed on this object.RequiredPermissioncheckViewPrivilege()Check whether or not the view action can be performed on this object.DatabaseConnectionconnect(Credential credential)Connect to the database using a credential.DatabaseConnectionBuildercreateDatabaseConnectionBuilder()Create a DatabaseConnectionBuilder for this database.static Databasefrom(ProcessServer processServer)Return Database from ProcessServer.AutoCommitStylegetAutoCommitStyle()Get the value for AutoCommitStyle.PropertiesgetDriverProperiesAsProperties()Return the driver properties, if any, as Properties object.StringgetDriverProperties()Get the value for DriverProperties.StringgetFrequentUsers()Get the value for FrequentUsers.List<String>getFrequentUsersAsList()Return the frequent users, if any, as List<String>.StringgetInitializationQuery()Get the value for InitializationQuery.StringgetInvalidUserNameOrPasswordSQLExceptions()Get the value for InvalidUserNameOrPasswordSQLExceptions.StringgetJdbcDriverClassName()Get the value for JdbcDriverClassName.StringgetJdbcUrl()Get the value for JdbcUrl.StringgetJdbcUserName()Get the value for JdbcUserName.LibrarygetLibrary()Get the Library.LonggetMaxAbandonedTime()Get the value for MaxAbandonedTime.LonggetMaxConnectTime()Get the value for MaxConnectTime.LonggetMaxIdleTime()Get the value for MaxIdleTime.LonggetMaxNumberOfConnections()Get the value for MaxNumberOfConnections.LonggetMaxNumberOfConnectionsPerFrequentUser()Get the value for MaxNumberOfConnectionsPerFrequentUser.LonggetMaxNumberOfConnectionsPerSporadicUser()Get the value for MaxNumberOfConnectionsPerSporadicUser.LonggetMinNumberOfIdleConnectionsPerFrequentUser()Get the value for MinNumberOfIdleConnectionsPerFrequentUser.StringgetNonTransientConnectSQLExceptions()Get the value for NonTransientConnectSQLExceptions.JdbcConnectionPoolingStategetPoolingState()Get the value for PoolingState.StringgetSevereSQLExceptions()Get the value for SevereSQLExceptions.StringgetValidationQuery()Get the value for ValidationQuery.voidsetAutoCommitStyle(AutoCommitStyle newAutoCommitStyle)Set the value for AutoCommitStyle.voidsetDriverProperties(String newDriverProperties)Set the value for DriverProperties.voidsetFrequentUsers(String newFrequentUsers)Set the value for FrequentUsers.voidsetInitializationQuery(String newInitializationQuery)Set the value for InitializationQuery.voidsetInvalidUserNameOrPasswordSQLExceptions(String newInvalidUserNameOrPasswordSQLExceptions)Set the value for InvalidUserNameOrPasswordSQLExceptions.voidsetJdbcDriverClassName(String newJdbcDriverClassName)Set the value for JdbcDriverClassName.voidsetJdbcUrl(String newJdbcUrl)Set the value for JdbcUrl.voidsetJdbcUserName(String newJdbcUserName)Set the value for JdbcUserName.voidsetLibrary(Library newLibrary)Set the value for Library.voidsetMaxAbandonedTime(Long newMaxAbandonedTime)Set the value for MaxAbandonedTime.voidsetMaxConnectTime(Long newMaxConnectTime)Set the value for MaxConnectTime.voidsetMaxIdleTime(Long newMaxIdleTime)Set the value for MaxIdleTime.voidsetMaxNumberOfConnections(Long newMaxNumberOfConnections)Set the value for MaxNumberOfConnections.voidsetMaxNumberOfConnectionsPerFrequentUser(Long newMaxNumberOfConnectionsPerFrequentUser)Set the value for MaxNumberOfConnectionsPerFrequentUser.voidsetMaxNumberOfConnectionsPerSporadicUser(Long newMaxNumberOfConnectionsPerSporadicUser)Set the value for MaxNumberOfConnectionsPerSporadicUser.voidsetMinNumberOfIdleConnectionsPerFrequentUser(Long newMinNumberOfIdleConnectionsPerFrequentUser)Set the value for MinNumberOfIdleConnectionsPerFrequentUser.voidsetNonTransientConnectSQLExceptions(String newNonTransientConnectSQLExceptions)Set the value for NonTransientConnectSQLExceptions.voidsetPoolingState(JdbcConnectionPoolingState newPoolingState)Set the value for PoolingState.voidsetSevereSQLExceptions(String newSevereSQLExceptions)Set the value for SevereSQLExceptions.voidsetValidationQuery(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 benullif 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 benullif 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 benullif 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 benullif 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:
SQLExceptioncom.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:
SQLExceptioncom.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
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-