Class SQLSessionContextImpl
java.lang.Object
org.apache.derby.impl.sql.conn.SQLSessionContextImpl
- All Implemented Interfaces:
SQLSessionContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionMaps a constraint id (key) into a Boolean for deferrable constraints.private SchemaDescriptorprivate Stringprivate Stringprivate BooleanTrue if all deferrable constraints are deferred in this transaction. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a handle to the session's constraint modes.Get the SQL current user of this SQL connection contextGet the schema of this SQL connection contextGet state of DEFERRED ALL setting.getRole()Get the SQL role of this SQL connection contextisDeferred(UUID constraintId) ReturnBoolean.TRUEif the constraint mode for this constraint/index has been set to deferred,Boolean.FALSEif it has been set to immediate.voidClear deferred information for this transaction.voidInitialize a inferior session context with the constraint mode map of the parent session context.voidSet the schema of this SQL connection contextvoidsetDeferred(UUID constraintId, boolean deferred) Set the constraint mode for this constraint todeferred.voidsetDeferredAll(Boolean deferred) Set the constraint mode for all deferrable constraints todeferred.voidSet the SQL role of this SQL connection contextvoidSet the SQL current user of this SQL connection context
-
Field Details
-
currentUser
-
currentRole
-
currentDefaultSchema
-
constraintModes
-
deferredAll
True if all deferrable constraints are deferred in this transaction.
-
-
Constructor Details
-
SQLSessionContextImpl
-
-
Method Details
-
setRole
Description copied from interface:SQLSessionContextSet the SQL role of this SQL connection context- Specified by:
setRolein interfaceSQLSessionContext
-
getRole
Description copied from interface:SQLSessionContextGet the SQL role of this SQL connection context- Specified by:
getRolein interfaceSQLSessionContext
-
setUser
Description copied from interface:SQLSessionContextSet the SQL current user of this SQL connection context- Specified by:
setUserin interfaceSQLSessionContext
-
getCurrentUser
Description copied from interface:SQLSessionContextGet the SQL current user of this SQL connection context- Specified by:
getCurrentUserin interfaceSQLSessionContext
-
setDefaultSchema
Description copied from interface:SQLSessionContextSet the schema of this SQL connection context- Specified by:
setDefaultSchemain interfaceSQLSessionContext
-
getDefaultSchema
Description copied from interface:SQLSessionContextGet the schema of this SQL connection context- Specified by:
getDefaultSchemain interfaceSQLSessionContext
-
getConstraintModes
Get a handle to the session's constraint modes. The caller is responsible for any cloning needed.- Specified by:
getConstraintModesin interfaceSQLSessionContext- Returns:
- constraint modes map
-
setConstraintModes
Initialize a inferior session context with the constraint mode map of the parent session context.- Specified by:
setConstraintModesin interfaceSQLSessionContext- Parameters:
hm- constraint mode map
-
setDeferred
Set the constraint mode for this constraint todeferred. Ifdeferredisfalse, to immediate checking, iftrueto deferred checking.- Specified by:
setDeferredin interfaceSQLSessionContext- Parameters:
constraintId- The constraint iddeferred- The new constraint mode
-
isDeferred
ReturnBoolean.TRUEif the constraint mode for this constraint/index has been set to deferred,Boolean.FALSEif it has been set to immediate. Any ALL setting is considered also. If the constraint mode hasn't been set for this constraint, returnnull. The constraint mode is the effectively the initial constraint mode in this case.- Specified by:
isDeferredin interfaceSQLSessionContext- Parameters:
constraintId- the constraint id- Returns:
Boolean.TRUEif the constraint mode for this constraint/index has been set to deferred,Boolean.FALSEif it has been set to immediate.
-
resetConstraintModes
public void resetConstraintModes()Clear deferred information for this transaction.- Specified by:
resetConstraintModesin interfaceSQLSessionContext
-
setDeferredAll
Set the constraint mode for all deferrable constraints todeferred. Ifdeferredisfalse, set to immediate checking, iftrueto deferred checking.nullis allowed: it means no ALL setting exists.- Specified by:
setDeferredAllin interfaceSQLSessionContext- Parameters:
deferred- the mode to set
-
getDeferredAll
Get state of DEFERRED ALL setting.- Specified by:
getDeferredAllin interfaceSQLSessionContext- Returns:
Trueis deferred all constraint mode has been set for this session context.Falseis deferred immediate has been set for this session context.nullmeans no ALL setting has been made for this context
-