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.final inthashCode()Returns a hash code value for this object.Returns the value of thetargetDataSourcerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apereo.cas.configuration.support.CloseableDataSource
destroyMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder, getParentLoggerMethods inherited from interface javax.sql.DataSource
createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriterMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
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
-
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
-