-
- Type Parameters:
T
-
public interface SqlRef<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.concurrent.CompletionStage<T>
fetch()
Submit an Operation that will fetch the value of the REF in the database.Operation<T>
fetchOperation()
Create and return an Operation that will fetch the value of the REF from the database.java.lang.String
getReferentTypeName()
Return the name of SQL type of the referent of this SQL REF.default java.util.concurrent.CompletionStage<java.lang.Void>
store(T value)
Submit an Operation that will store the new value of the referent into the REF in the database.Operation<java.lang.Void>
storeOperation(T value)
Create and return an Operation that will set the value of the REF in the database.
-
-
-
Method Detail
-
getReferentTypeName
java.lang.String getReferentTypeName()
Return the name of SQL type of the referent of this SQL REF. ISSUE: Oracle Database JDBC driver may do a round trip for this. Is this that heavy in other databases?- Returns:
-
fetchOperation
Operation<T> fetchOperation()
Create and return an Operation that will fetch the value of the REF from the database. The value of the Operation is the value of the REF.- Returns:
- an Operation that will fetch the referent of this SqlRef
-
fetch
default java.util.concurrent.CompletionStage<T> fetch()
Submit an Operation that will fetch the value of the REF in the database.- Returns:
- a Future that will complete when the submitted Operation completes. The value of the Future is the value of the REF.
-
storeOperation
Operation<java.lang.Void> storeOperation(T value)
Create and return an Operation that will set the value of the REF in the database.- Parameters:
value
-- Returns:
- an Operation that will store the new referent into the REF
-
store
default java.util.concurrent.CompletionStage<java.lang.Void> store(T value)
Submit an Operation that will store the new value of the referent into the REF in the database.- Parameters:
value
-- Returns:
- a Future that will complete when the submitted Operation completes.
-
-