Record Class QueryCondition
java.lang.Object
java.lang.Record
org.nervousync.database.query.condition.QueryCondition
- Record Components:
connectionCode- Condition connection codeconditionCode- Condition operate codeidentifyKey- Column identify key, maybe field name or column namematchCondition- Condition match condition object
public record QueryCondition(ConnectionCode connectionCode, ConditionCode conditionCode, String identifyKey, MatchCondition matchCondition)
extends Record
The type Query condition.
- Version:
- $Revision : 1.0 $ $Date: 10/28/2020 17:35 $
- Author:
- Steven Wee wmkm0113@Hotmail.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe enum Condition type. -
Constructor Summary
ConstructorsConstructorDescriptionQueryCondition(ConnectionCode connectionCode, ConditionCode conditionCode, String identifyKey, MatchCondition matchCondition) Instantiates a new Query condition. -
Method Summary
Modifier and TypeMethodDescriptioncacheKey()Cache key string.Gets condition code.Gets connection code.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Gets identify key.booleanmatch(ConnectionCode connectionCode, ConditionCode conditionCode, String identifyKey, MatchCondition matchCondition) Gets match condition.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QueryCondition
public QueryCondition(ConnectionCode connectionCode, ConditionCode conditionCode, String identifyKey, MatchCondition matchCondition) Instantiates a new Query condition.- Parameters:
connectionCode- the connection codeconditionCode- the condition codeidentifyKey- the identify keymatchCondition- the match condition
-
-
Method Details
-
match
public boolean match(ConnectionCode connectionCode, ConditionCode conditionCode, String identifyKey, MatchCondition matchCondition) -
connectionCode
Gets connection code.- Returns:
- the connection code
-
conditionCode
Gets condition code.- Returns:
- the condition code
-
identifyKey
Gets identify key.- Returns:
- the identify key
-
matchCondition
Gets match condition.- Returns:
- the match condition
-
cacheKey
Cache key string.- Returns:
- the string
-
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).
-