Record Class DefaultCloseableDataSource
java.lang.Object
java.lang.Record
org.apereo.cas.configuration.support.DefaultCloseableDataSource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource,CloseableDataSource,org.springframework.beans.factory.DisposableBean
public record DefaultCloseableDataSource(DataSource targetDataSource)
extends Record
implements CloseableDataSource
This is
DefaultCloseableDataSource.- Since:
- 6.4.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCloseableDataSource(DataSource targetDataSource) Creates an instance of aDefaultCloseableDataSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close.final booleanIndicates whether some other object is "equal to" this one.getConnection(String arg0, String arg1) intfinal inthashCode()Returns a hash code value for this object.booleanisWrapperFor(Class<?> arg0) voidsetLoginTimeout(int arg0) voidsetLogWriter(PrintWriter arg0) Returns the value of thetargetDataSourcerecord component.final StringtoString()Returns a string representation of this record class.<T> TMethods inherited from interface org.apereo.cas.configuration.support.CloseableDataSource
destroy
-
Constructor Details
-
DefaultCloseableDataSource
Creates an instance of aDefaultCloseableDataSourcerecord class.- Parameters:
targetDataSource- the value for thetargetDataSourcerecord component
-
-
Method Details
-
close
Description copied from interface:CloseableDataSourceClose.- Specified by:
closein interfaceCloseableDataSource- Throws:
IOException- the io exception
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
createConnectionBuilder
- Specified by:
createConnectionBuilderin interfaceDataSource- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
createShardingKeyBuilder
- Specified by:
createShardingKeyBuilderin interfaceCommonDataSource- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
targetDataSource
Returns the value of thetargetDataSourcerecord component.- Specified by:
targetDataSourcein interfaceCloseableDataSource- Returns:
- the value of the
targetDataSourcerecord component
-