Package io.vertx.mongo.client.model
Class Collation
- java.lang.Object
-
- io.vertx.mongo.client.model.Collation
-
public class Collation extends java.lang.Object
The options regarding collation support in MongoDB 3.4+- Since:
- 3.4
- Since server release
- 3.4
- MongoDB documentation
- Create Collection
- Index options
-
-
Constructor Summary
Constructors Constructor Description Collation()
Collation(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollationAlternate
getAlternate()
Returns the collation alternateCollationCaseFirst
getCaseFirst()
Returns the collation case first valuejava.lang.String
getLocale()
Returns the localeCollationMaxVariable
getMaxVariable()
Returns the maxVariableCollationStrength
getStrength()
Returns the collation strengthjava.lang.Boolean
isBackwards()
Returns the backwards valuejava.lang.Boolean
isCaseLevel()
Returns the case level valuejava.lang.Boolean
isNormalization()
Returns the normalization valuejava.lang.Boolean
isNumericOrdering()
Returns the numeric ordering, if true will order numbers based on numerical order and not collation order.Collation
setAlternate(CollationAlternate alternate)
Sets the alternateCollation
setBackwards(java.lang.Boolean backwards)
Sets the backwards valueCollation
setCaseFirst(CollationCaseFirst caseFirst)
Sets the collation case first valueCollation
setCaseLevel(java.lang.Boolean caseLevel)
Sets the case level valueCollation
setLocale(java.lang.String locale)
Sets the localeCollation
setMaxVariable(CollationMaxVariable maxVariable)
Sets the maxVariableCollation
setNormalization(java.lang.Boolean normalization)
Sets the normalization valueCollation
setNumericOrdering(java.lang.Boolean numericOrdering)
Sets the numeric orderingCollation
setStrength(CollationStrength strength)
Sets the collation strengthJsonObject
toJson()
-
-
-
Constructor Detail
-
Collation
public Collation()
-
Collation
public Collation(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setLocale
public Collation setLocale(java.lang.String locale)
Sets the locale- Parameters:
locale
- the locale- Returns:
- this
- See Also:
- ICU User Guide - Locale
-
getLocale
public java.lang.String getLocale()
Returns the locale- Returns:
- the locale
- See Also:
- ICU User Guide - Locale
-
setCaseLevel
public Collation setCaseLevel(java.lang.Boolean caseLevel)
Sets the case level valueTurns on case sensitivity
- Parameters:
caseLevel
- the case level value- Returns:
- this
-
isCaseLevel
public java.lang.Boolean isCaseLevel()
Returns the case level value- Returns:
- the case level value
-
setCaseFirst
public Collation setCaseFirst(CollationCaseFirst caseFirst)
Sets the collation case first valueDetermines if Uppercase or lowercase values should come first
- Parameters:
caseFirst
- the collation case first value- Returns:
- this
-
getCaseFirst
public CollationCaseFirst getCaseFirst()
Returns the collation case first value- Returns:
- the collation case first value
-
setStrength
public Collation setStrength(CollationStrength strength)
Sets the collation strength- Parameters:
strength
- the strength- Returns:
- this
-
getStrength
public CollationStrength getStrength()
Returns the collation strength- Returns:
- the collation strength
-
setNumericOrdering
public Collation setNumericOrdering(java.lang.Boolean numericOrdering)
Sets the numeric ordering- Parameters:
numericOrdering
- if true will order numbers based on numerical order and not collation order- Returns:
- this
-
isNumericOrdering
public java.lang.Boolean isNumericOrdering()
Returns the numeric ordering, if true will order numbers based on numerical order and not collation order.- Returns:
- the numeric ordering
-
setAlternate
public Collation setAlternate(CollationAlternate alternate)
Sets the alternateControls whether spaces and punctuation are considered base characters
- Parameters:
alternate
- the alternate- Returns:
- this
-
getAlternate
public CollationAlternate getAlternate()
Returns the collation alternate- Returns:
- the alternate
-
setMaxVariable
public Collation setMaxVariable(CollationMaxVariable maxVariable)
Sets the maxVariable- Parameters:
maxVariable
- the maxVariable- Returns:
- this
-
getMaxVariable
public CollationMaxVariable getMaxVariable()
Returns the maxVariableControls which characters are affected by collection alternate
CollationAlternate.SHIFTED
.- Returns:
- the maxVariable
-
setNormalization
public Collation setNormalization(java.lang.Boolean normalization)
Sets the normalization valueIf true, normalizes text into Unicode NFD.
- Parameters:
normalization
- the normalization value- Returns:
- this
-
isNormalization
public java.lang.Boolean isNormalization()
Returns the normalization valueIf true, normalizes text into Unicode NFD.
- Returns:
- the normalization
-
setBackwards
public Collation setBackwards(java.lang.Boolean backwards)
Sets the backwards valueCauses secondary differences to be considered in reverse order, as it is done in the French language
- Parameters:
backwards
- the backwards value- Returns:
- this
-
isBackwards
public java.lang.Boolean isBackwards()
Returns the backwards value- Returns:
- the backwards value
-
-