Class RecordSecurityLock
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.security.RecordSecurityLock
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
MultiRecordSecurityLock
Define (for a table) a lock that applies to records in the table - e.g.,
a key type, and a field that has values for that key.
Here's an example of how the joinNameChain should be set up:
given a table: orderLineItemExtrinsic (that's 2 away from order, where the security field is):
- recordSecurityLock.fieldName = order.clientId
- recordSecurityLock.joinNameChain = [orderJoinOrderLineItem, orderLineItemJoinOrderLineItemExtrinsic]
that is - what's the chain that takes us FROM the security fieldName TO the table with the lock.
LockScope controls what the lock prevents users from doing without a valid key.
- READ_AND_WRITE means that users cannot read or write records without a valid key.
- WRITE means that users cannot write records without a valid key (but they can read them).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RecordSecurityLock
clone()
Getter for fieldNameGetter for joinNameChainGetter for lockScopeGetter for nullValueBehaviorGetter for securityKeyTypevoid
setFieldName
(String fieldName) Setter for fieldNamevoid
setJoinNameChain
(List<String> joinNameChain) Setter for joinNameChainvoid
setLockScope
(RecordSecurityLock.LockScope lockScope) Setter for lockScopevoid
setNullValueBehavior
(RecordSecurityLock.NullValueBehavior nullValueBehavior) Setter for nullValueBehaviorvoid
setSecurityKeyType
(String securityKeyType) Setter for securityKeyTypetoString()
withFieldName
(String fieldName) Fluent setter for fieldNamewithJoinNameChain
(List<String> joinNameChain) Fluent setter for joinNameChainwithLockScope
(RecordSecurityLock.LockScope lockScope) Fluent setter for lockScopewithNullValueBehavior
(RecordSecurityLock.NullValueBehavior nullValueBehavior) Fluent setter for nullValueBehaviorwithSecurityKeyType
(String securityKeyType) Fluent setter for securityKeyType
-
Constructor Details
-
RecordSecurityLock
public RecordSecurityLock()Constructor
-
-
Method Details
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getSecurityKeyType
Getter for securityKeyType -
setSecurityKeyType
Setter for securityKeyType -
withSecurityKeyType
Fluent setter for securityKeyType -
getFieldName
Getter for fieldName -
setFieldName
Setter for fieldName -
withFieldName
Fluent setter for fieldName -
getNullValueBehavior
Getter for nullValueBehavior -
setNullValueBehavior
Setter for nullValueBehavior -
withNullValueBehavior
public RecordSecurityLock withNullValueBehavior(RecordSecurityLock.NullValueBehavior nullValueBehavior) Fluent setter for nullValueBehavior -
getJoinNameChain
-
setJoinNameChain
-
withJoinNameChain
Fluent setter for joinNameChain -
getLockScope
Getter for lockScope -
setLockScope
Setter for lockScope -
withLockScope
Fluent setter for lockScope -
toString
-