Package io.vertx.mongo.client.model
Class Collation
- java.lang.Object
-
- io.vertx.mongo.client.model.Collation
-
public class Collation extends java.lang.ObjectThe 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 CollationAlternategetAlternate()Returns the collation alternateCollationCaseFirstgetCaseFirst()Returns the collation case first valuejava.lang.StringgetLocale()Returns the localeCollationMaxVariablegetMaxVariable()Returns the maxVariableCollationStrengthgetStrength()Returns the collation strengthjava.lang.BooleanisBackwards()Returns the backwards valuejava.lang.BooleanisCaseLevel()Returns the case level valuejava.lang.BooleanisNormalization()Returns the normalization valuejava.lang.BooleanisNumericOrdering()Returns the numeric ordering, if true will order numbers based on numerical order and not collation order.CollationsetAlternate(CollationAlternate alternate)Sets the alternateCollationsetBackwards(java.lang.Boolean backwards)Sets the backwards valueCollationsetCaseFirst(CollationCaseFirst caseFirst)Sets the collation case first valueCollationsetCaseLevel(java.lang.Boolean caseLevel)Sets the case level valueCollationsetLocale(java.lang.String locale)Sets the localeCollationsetMaxVariable(CollationMaxVariable maxVariable)Sets the maxVariableCollationsetNormalization(java.lang.Boolean normalization)Sets the normalization valueCollationsetNumericOrdering(java.lang.Boolean numericOrdering)Sets the numeric orderingCollationsetStrength(CollationStrength strength)Sets the collation strengthJsonObjecttoJson()
-
-
-
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
-
-