Annotation Type Collation


  • public @interface Collation
    Defines the collation options for an index
    Since:
    1.3
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String locale  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      com.mongodb.client.model.CollationAlternate alternate
      Controls whether spaces and punctuation are considered base characters
      boolean backwards
      Causes secondary differences to be considered in reverse order, as it is done in the French language
      com.mongodb.client.model.CollationCaseFirst caseFirst
      Determines if Uppercase or lowercase values should come first
      boolean caseLevel
      Turns on case sensitivity
      com.mongodb.client.model.CollationMaxVariable maxVariable  
      boolean normalization  
      boolean numericOrdering  
      com.mongodb.client.model.CollationStrength strength  
      • backwards

        boolean backwards
        Causes secondary differences to be considered in reverse order, as it is done in the French language
        Returns:
        the backwards value
        Default:
        false
      • caseLevel

        boolean caseLevel
        Turns on case sensitivity
        Returns:
        the case level value
        Default:
        false
      • normalization

        boolean normalization
        Returns:
        the normalization value. If true, normalizes text into Unicode NFD.
        Default:
        false
      • numericOrdering

        boolean numericOrdering
        Returns:
        the numeric ordering. if true will order numbers based on numerical order and not collation order
        Default:
        false
      • alternate

        com.mongodb.client.model.CollationAlternate alternate
        Controls whether spaces and punctuation are considered base characters
        Returns:
        the alternate
        Default:
        com.mongodb.client.model.CollationAlternate.NON_IGNORABLE
      • caseFirst

        com.mongodb.client.model.CollationCaseFirst caseFirst
        Determines if Uppercase or lowercase values should come first
        Returns:
        the collation case first value
        Default:
        com.mongodb.client.model.CollationCaseFirst.OFF
      • maxVariable

        com.mongodb.client.model.CollationMaxVariable maxVariable
        Returns:
        the maxVariable
        Default:
        com.mongodb.client.model.CollationMaxVariable.PUNCT
      • strength

        com.mongodb.client.model.CollationStrength strength
        Returns:
        the collation strength
        Default:
        com.mongodb.client.model.CollationStrength.TERTIARY