Remove remaining Kotlin "translations" of Java APIs in the reference manual
This commit is contained in:
@@ -158,8 +158,7 @@ transaction management and the
|
||||
transaction management. The following listing shows the definition of the
|
||||
`PlatformTransactionManager` API:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
.Java
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
public interface PlatformTransactionManager extends TransactionManager {
|
||||
|
||||
@@ -170,21 +169,6 @@ transaction management. The following listing shows the definition of the
|
||||
void rollback(TransactionStatus status) throws TransactionException;
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface PlatformTransactionManager : TransactionManager {
|
||||
|
||||
@Throws(TransactionException::class)
|
||||
fun getTransaction(definition: TransactionDefinition): TransactionStatus
|
||||
|
||||
@Throws(TransactionException::class)
|
||||
fun commit(status: TransactionStatus)
|
||||
|
||||
@Throws(TransactionException::class)
|
||||
fun rollback(status: TransactionStatus)
|
||||
}
|
||||
----
|
||||
|
||||
This is primarily a service provider interface (SPI), although you can use it
|
||||
<<transaction-programmatic-ptm, programmatically>> from your application code. Because
|
||||
@@ -215,8 +199,7 @@ reactive applications that make use of reactive types or Kotlin Coroutines. The
|
||||
listing shows the transaction strategy defined by
|
||||
`org.springframework.transaction.ReactiveTransactionManager`:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
.Java
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
public interface ReactiveTransactionManager extends TransactionManager {
|
||||
|
||||
@@ -227,21 +210,6 @@ listing shows the transaction strategy defined by
|
||||
Mono<Void> rollback(ReactiveTransaction status) throws TransactionException;
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface ReactiveTransactionManager : TransactionManager {
|
||||
|
||||
@Throws(TransactionException::class)
|
||||
fun getReactiveTransaction(definition: TransactionDefinition): Mono<ReactiveTransaction>
|
||||
|
||||
@Throws(TransactionException::class)
|
||||
fun commit(status: ReactiveTransaction): Mono<Void>
|
||||
|
||||
@Throws(TransactionException::class)
|
||||
fun rollback(status: ReactiveTransaction): Mono<Void>
|
||||
}
|
||||
----
|
||||
|
||||
The reactive transaction manager is primarily a service provider interface (SPI),
|
||||
although you can use it <<transaction-programmatic-rtm, programmatically>> from your
|
||||
@@ -276,8 +244,7 @@ control transaction execution and query transaction status. The concepts should
|
||||
familiar, as they are common to all transaction APIs. The following listing shows the
|
||||
`TransactionStatus` interface:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
.Java
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
public interface TransactionStatus extends TransactionExecution, SavepointManager, Flushable {
|
||||
|
||||
@@ -298,24 +265,6 @@ familiar, as they are common to all transaction APIs. The following listing show
|
||||
boolean isCompleted();
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface TransactionStatus : TransactionExecution, SavepointManager, Flushable {
|
||||
|
||||
override fun isNewTransaction(): Boolean
|
||||
|
||||
fun hasSavepoint(): Boolean
|
||||
|
||||
override fun setRollbackOnly()
|
||||
|
||||
override fun isRollbackOnly(): Boolean
|
||||
|
||||
fun flush()
|
||||
|
||||
override fun isCompleted(): Boolean
|
||||
}
|
||||
----
|
||||
|
||||
Regardless of whether you opt for declarative or programmatic transaction management in
|
||||
Spring, defining the correct `TransactionManager` implementation is absolutely essential.
|
||||
@@ -8565,8 +8514,7 @@ the two Spring interfaces used for this purpose.
|
||||
Spring abstracts all marshalling operations behind the
|
||||
`org.springframework.oxm.Marshaller` interface, the main method of which follows:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
.Java
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
public interface Marshaller {
|
||||
|
||||
@@ -8576,22 +8524,6 @@ Spring abstracts all marshalling operations behind the
|
||||
void marshal(Object graph, Result result) throws XmlMappingException, IOException;
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface Marshaller {
|
||||
|
||||
/**
|
||||
* Marshal the object graph with the given root into the provided Result.
|
||||
*/
|
||||
@Throws(XmlMappingException::class, IOException::class)
|
||||
fun marshal(
|
||||
graph: Any,
|
||||
result: Result
|
||||
)
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
The `Marshaller` interface has one main method, which marshals the given object to a
|
||||
given `javax.xml.transform.Result`. The result is a tagging interface that basically
|
||||
@@ -8625,8 +8557,7 @@ to determine how your O-X technology manages this.
|
||||
Similar to the `Marshaller`, we have the `org.springframework.oxm.Unmarshaller`
|
||||
interface, which the following listing shows:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
.Java
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
public interface Unmarshaller {
|
||||
|
||||
@@ -8636,18 +8567,6 @@ interface, which the following listing shows:
|
||||
Object unmarshal(Source source) throws XmlMappingException, IOException;
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface Unmarshaller {
|
||||
|
||||
/**
|
||||
* Unmarshal the given provided Source into an object graph.
|
||||
*/
|
||||
@Throws(XmlMappingException::class, IOException::class)
|
||||
fun unmarshal(source: Source): Any
|
||||
}
|
||||
----
|
||||
|
||||
This interface also has one method, which reads from the given
|
||||
`javax.xml.transform.Source` (an XML input abstraction) and returns the object read. As
|
||||
|
||||
Reference in New Issue
Block a user