org.springframework.data.mongodb.core.convert

Class QueryMapper.Field

  • java.lang.Object
    • org.springframework.data.mongodb.core.convert.QueryMapper.Field
    • Field Detail

      • name

        protected final String name
    • Constructor Detail

      • Field

        public Field(String name)
        Creates a new DocumentField without meta-information but the given name.
        Parameters:
        name - must not be null or empty.
    • Method Detail

      • with

        public QueryMapper.Field with(String name)
        Returns a new DocumentField with the given name.
        Parameters:
        name - must not be null or empty.
        Returns:
      • isIdField

        public boolean isIdField()
        Returns whether the current field is the id field.
        Returns:
      • getProperty

        @Nullable
        public MongoPersistentProperty getProperty()
        Returns the underlying MongoPersistentProperty backing the field. For path traversals this will be the property that represents the value to handle. This means it'll be the leaf property for plain paths or the association property in case we refer to an association somewhere in the path.
        Returns:
        can be null.
      • isAssociation

        public boolean isAssociation()
        Returns whether the field represents an association.
        Returns:
      • getMappedKey

        public String getMappedKey()
        Returns the key to be used in the mapped document eventually.
        Returns:
      • containsAssociation

        public boolean containsAssociation()
        Returns whether the field references an association in case it refers to a nested field.
        Returns: