Class NFEDBSequenceIdManager

    • Constructor Detail

      • NFEDBSequenceIdManager

        public NFEDBSequenceIdManager​(NFEDataSource dataSource)
    • Method Detail

      • setModel

        public void setModel​(NFEModel model)
        Description copied from interface: NFEIdManager
        Sets the current NFEModel instance. This is typically set automatically when a new NFEModel instance is initialized.
        Specified by:
        setModel in interface NFEIdManager
        Parameters:
        model - an NFEModel instance
      • getModel

        public NFEModel getModel()
        Description copied from interface: NFEIdManager
        Gets the current NFEModel instance
        Specified by:
        getModel in interface NFEIdManager
        Returns:
        the assigned NFEModel instance
      • setIdGenerator

        public void setIdGenerator​(java.lang.String entityName,
                                   NFEIdGenerator idGen)
        Description copied from interface: NFEIdManager
        Associates an NFEIdGenerator instance to the given entity. The NFEIdGenerator instance will be used to create new ID's for the entity.
        Specified by:
        setIdGenerator in interface NFEIdManager
        Parameters:
        entityName - an entity name. See the field summary for supported entity names.
        idGen - an NFEIdGenerator instance
      • getIdGenerator

        public NFEIdGenerator getIdGenerator​(java.lang.String entityName)
        Description copied from interface: NFEIdManager
        Gets the NFEIdGenerator currently used for generating ID's for the given entity
        Specified by:
        getIdGenerator in interface NFEIdManager
        Parameters:
        entityName - an entity name.
        Returns:
        an NFEIdGenerator instance or null if the entity is not related to any ID generator
      • getNextId

        public long getNextId​(java.lang.String entityName)
        Description copied from interface: NFEIdManager
        Gets the next ID for the given entity name. It is equivalent to get the ID generator for the entity and call NFEIdGenerator.getNextId()
        Specified by:
        getNextId in interface NFEIdManager
        Parameters:
        entityName - an entity name
        Returns:
        a valid ID if the entity is related to an ID generator
      • getNextNodeId

        public long getNextNodeId()
        Description copied from interface: NFEIdManager
        Gets the next node ID. This is a shorthand for getNextId( NFEIdManager.ENTITY_NODE )
        Specified by:
        getNextNodeId in interface NFEIdManager
        Returns:
        a node ID
      • getNextLinkId

        public long getNextLinkId()
        Description copied from interface: NFEIdManager
        Gets the next link ID. This is a shorthand for getNextId( NFEIdManager.ENTITY_LINK )
        Specified by:
        getNextLinkId in interface NFEIdManager
        Returns:
        a link ID
      • getNextFeatureId

        public long getNextFeatureId​(long featureLayerId)
        Description copied from interface: NFEIdManager
        Gets the next feature ID for the Feature Layer identified by the given featureLayerId
        Specified by:
        getNextFeatureId in interface NFEIdManager
        Parameters:
        featureLayerId - an existing Feature Layer ID
        Returns:
        a feature ID
      • getNextFeatureElementSequence

        public long getNextFeatureElementSequence​(long featureLayerId)
        Description copied from interface: NFEIdManager
        Gets the next feature element sequence for the Feature Layer identified by the given featureLayerId. Note that the sequence is used as the ID of a feature element. A feature may contain feature element with no necessarily consecutive sequences.
        Specified by:
        getNextFeatureElementSequence in interface NFEIdManager
        Parameters:
        featureLayerId - featureLayerId an existing Feature Layer ID
        Returns:
        a feature element sequence.
      • setIdBufferSize

        public void setIdBufferSize​(int size)
        Description copied from interface: NFEIdManager
        Sets the ID buffer size used by all the ID generators managed
        Specified by:
        setIdBufferSize in interface NFEIdManager
        Parameters:
        size - the size of the buffer