Class RecordAggregation

    • Field Detail

      • lazy

        protected boolean lazy
    • Constructor Detail

      • RecordAggregation

        public RecordAggregation()
    • Method Detail

      • setType

        public void setType​(java.lang.Class<?> type)
        Sets the collection type.
        Specified by:
        setType in interface Property
        Parameters:
        type - Collection class type
      • getType

        public java.lang.Class<?> getType()
        Specified by:
        getType in interface Property
      • createValue

        public java.lang.Object createValue​(ParsingContext context)
        Description copied from interface: Property
        Creates the property value and returns it.
        Specified by:
        createValue in interface Property
        Parameters:
        context - the ParsingContext
        Returns:
        the property value
      • getNullValue

        public java.lang.Object getNullValue()
      • createAggregationType

        protected java.lang.Object createAggregationType()
      • getProperty

        public Property getProperty()
        Description copied from interface: Selector
        Returns the Property mapped to this component, or null if there is no property mapping.
        Specified by:
        getProperty in interface Selector
        Returns:
        the Property mapped to this component
      • matchNext

        public Selector matchNext​(MarshallingContext context)
        Description copied from interface: Selector
        Finds a parser for marshalling a bean object. If matched by this Selector, the method should set the bean object on the property tree and return itself.
        Specified by:
        matchNext in interface Selector
        Parameters:
        context - the MarshallingContext
        Returns:
        the matched Selector for marshalling the bean object
      • close

        public Selector close​(ParsingContext context)
        Description copied from interface: Selector
        Checks for any unsatisfied components before the stream is closed.
        Specified by:
        close in interface Selector
        Parameters:
        context - the ParsingContext
        Returns:
        the first unsatisfied node
      • getCount

        public int getCount​(ParsingContext context)
        Description copied from interface: Selector
        Returns the number of times this component was matched within the current iteration of its parent component.
        Specified by:
        getCount in interface Selector
        Parameters:
        context - the ParsingContext
        Returns:
        the match count
      • setCount

        public void setCount​(ParsingContext context,
                             int count)
        Description copied from interface: Selector
        Sets the number of times this component was matched within the current iteration of its parent component.
        Specified by:
        setCount in interface Selector
        Parameters:
        context - the ParsingContext
        count - the new match count
      • getOrder

        public int getOrder()
        Description copied from interface: Selector
        Returns the order of this component (within the context of its parent).
        Specified by:
        getOrder in interface Selector
        Returns:
        the component order
      • isMaxOccursReached

        public boolean isMaxOccursReached​(ParsingContext context)
        Description copied from interface: Selector
        Returns whether this component has reached its maximum occurrences.
        Specified by:
        isMaxOccursReached in interface Selector
        Parameters:
        context - the ParsingContext
        Returns:
        true if maximum occurrences has been reached
      • updateState

        public void updateState​(ParsingContext context,
                                java.lang.String namespace,
                                java.util.Map<java.lang.String,​java.lang.Object> state)
        Description copied from interface: Selector
        Updates a Map with the current state of the Writer to allow for restoration at a later time.
        Specified by:
        updateState in interface Selector
        Parameters:
        context - the ParsingContext
        namespace - a String to prefix all state keys with
        state - the Map to update with the latest state
      • restoreState

        public void restoreState​(ParsingContext context,
                                 java.lang.String namespace,
                                 java.util.Map<java.lang.String,​java.lang.Object> state)
                          throws java.lang.IllegalStateException
        Description copied from interface: Selector
        Restores a Map of previously stored state information.
        Specified by:
        restoreState in interface Selector
        Parameters:
        context - the ParsingContext
        namespace - a String to prefix all state keys with
        state - the Map containing the state to restore
        Throws:
        java.lang.IllegalStateException - if the Map is missing any state information
      • getMinOccurs

        public int getMinOccurs()
        Description copied from interface: Selector
        Returns the minimum number of occurrences of this component (within the context of its parent).
        Specified by:
        getMinOccurs in interface Selector
        Returns:
        the minimum occurrences
      • getMaxOccurs

        public int getMaxOccurs()
        Description copied from interface: Selector
        Returns the maximum number of occurrences of this component (within the context of its parent).
        Specified by:
        getMaxOccurs in interface Selector
        Returns:
        the maximum occurrences
      • isLazy

        public boolean isLazy()
      • setLazy

        public void setLazy​(boolean lazy)
      • getSelector

        public Selector getSelector()
        Returns the child selector.
        Returns:
        the child Selector
      • defines

        public boolean defines​(java.lang.Object value)
        Specified by:
        defines in interface Property
      • setIdentifier

        public void setIdentifier​(boolean identifier)
        Specified by:
        setIdentifier in interface Property
      • isIdentifier

        public boolean isIdentifier()
        Description copied from interface: Parser
        Returns whether this parser or any descendant of this parser is used to identify a record during unmarshalling.
        Specified by:
        isIdentifier in interface Parser
        Specified by:
        isIdentifier in interface Property
        Overrides:
        isIdentifier in class DelegatingParser
        Returns:
        true if this parser or any descendant is used to identify a record
      • registerLocals

        public void registerLocals​(java.util.Set<ParserLocal<? extends java.lang.Object>> locals)
        Description copied from class: Component
        Called by a stream to register variables stored in the parsing context. This method should be overridden by subclasses that need to register one or more parser context variables.
        Overrides:
        registerLocals in class Component
        Parameters:
        locals - set of local variables
      • isRecordGroup

        public boolean isRecordGroup()
        Description copied from interface: Selector
        Returns whether this component is a record group.
        Specified by:
        isRecordGroup in interface Selector
        Returns:
        true if this component is a record group, false otherwise