Class PatchDAOImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.mybatis.spring.SqlSessionTemplate template  
    • Constructor Summary

      Constructors 
      Constructor Description
      PatchDAOImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeBatch()
      Write a batch of insert or update commands
      java.util.List<org.alfresco.service.cmr.repository.NodeRef> getChildrenOfTheSharedSurfConfigFolder​(java.lang.Long minNodeId, java.lang.Long maxNodeId)
      Finds folders of the shared surf-config (for all tenants): company_home/sites/surf-config/components company_home/sites/surf-config/pages company_home/sites/surf-config/pages/user company_home/sites/surf-config/pages/user{userId}
      long getCountNodesWithAspects​(java.util.Set<org.alfresco.service.namespace.QName> qnames)  
      long getCountNodesWithTypId​(org.alfresco.service.namespace.QName typeQName)
      Gets the total number of nodes which match the given Type QName.
      long getMaxAdmNodeID()  
      java.util.List<java.lang.Long> getNodesByAspectQNameId​(java.lang.Long aspectQNameId, java.lang.Long minNodeId, java.lang.Long maxNodeId)
      Find all the nodes ids with the given aspect
      java.util.List<java.lang.Long> getNodesByContentPropertyMimetypeId​(java.lang.Long mimetypeId, java.lang.Long minNodeId, java.lang.Long maxNodeId)
      Find all the nodes ids with the given content property set with the given mimetype
      java.util.List<java.lang.Long> getNodesByTypeQNameAndAspectQNameId​(long typeQNameId, long aspectQNameId, long minNodeId, long maxNodeId)
      Find all the nodes ids with the given aspect and type
      java.util.List<java.lang.Long> getNodesByTypeQNameId​(java.lang.Long typeQNameId, java.lang.Long minNodeId, java.lang.Long maxNodeId)
      Find all the nodes ids with the given type
      java.util.List<java.lang.Long> getNodesByTypeUriId​(java.lang.Long nsId, java.lang.Long minNodeId, java.lang.Long maxNodeId)
      Find all the nodes ids with the given type uri
      java.util.List<org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,​java.lang.String>> getNodesOfTypeWithNamePattern​(org.alfresco.service.namespace.QName typeQName, java.lang.String namePattern)
      Query for a list of nodes that have a given type and share the same name pattern (SQL LIKE syntax)
      void setContentDataDAO​(ContentDataDAO contentDataDAO)  
      void setLocaleDAO​(LocaleDAO localeDAO)  
      void setQnameDAO​(QNameDAO qnameDAO)  
      void setSqlSessionTemplate​(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)  
      void startBatch()
      Start a batch of insert or update commands
      int updateContentMimetypeIds​(java.lang.Long oldMimetypeId, java.lang.Long newMimetypeId)
      Update all alf_content_data mimetype references.
      int updatePersonSizeCurrentType()
      Update all alf_node_properties of 'sizeCurrent' name to have correct persisted type of Long.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • template

        protected org.mybatis.spring.SqlSessionTemplate template
    • Constructor Detail

      • PatchDAOImpl

        public PatchDAOImpl()
    • Method Detail

      • setSqlSessionTemplate

        public final void setSqlSessionTemplate​(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
      • setQnameDAO

        public void setQnameDAO​(QNameDAO qnameDAO)
      • setLocaleDAO

        public void setLocaleDAO​(LocaleDAO localeDAO)
      • setContentDataDAO

        public void setContentDataDAO​(ContentDataDAO contentDataDAO)
      • startBatch

        public void startBatch()
        Description copied from interface: BatchingDAO
        Start a batch of insert or update commands
      • executeBatch

        public void executeBatch()
        Description copied from interface: BatchingDAO
        Write a batch of insert or update commands
      • getMaxAdmNodeID

        public long getMaxAdmNodeID()
      • updateContentMimetypeIds

        public int updateContentMimetypeIds​(java.lang.Long oldMimetypeId,
                                            java.lang.Long newMimetypeId)
        Description copied from interface: PatchDAO
        Update all alf_content_data mimetype references.
        Parameters:
        oldMimetypeId - the ID to search for
        newMimetypeId - the ID to change to
        Returns:
        the number of rows affected
      • updatePersonSizeCurrentType

        public int updatePersonSizeCurrentType()
        Description copied from interface: PatchDAO
        Update all alf_node_properties of 'sizeCurrent' name to have correct persisted type of Long.
        Returns:
        the number of rows affected
      • getNodesOfTypeWithNamePattern

        public java.util.List<org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,​java.lang.String>> getNodesOfTypeWithNamePattern​(org.alfresco.service.namespace.QName typeQName,
                                                                                                                                                        java.lang.String namePattern)
        Description copied from interface: PatchDAO
        Query for a list of nodes that have a given type and share the same name pattern (SQL LIKE syntax)
        Parameters:
        typeQName - the node type
        namePattern - the SQL LIKE pattern
        Returns:
        Returns the node ID and node name
      • getCountNodesWithAspects

        public long getCountNodesWithAspects​(java.util.Set<org.alfresco.service.namespace.QName> qnames)
        Parameters:
        qnames - the qnames to search for
        Returns:
        Returns a count of the number of nodes that have either of the aspects
      • getNodesByTypeQNameId

        public java.util.List<java.lang.Long> getNodesByTypeQNameId​(java.lang.Long typeQNameId,
                                                                    java.lang.Long minNodeId,
                                                                    java.lang.Long maxNodeId)
        Description copied from interface: PatchDAO
        Find all the nodes ids with the given type
        Parameters:
        typeQNameId - - the id of the type qname
        minNodeId - - min node id in the result set - inclusive
        maxNodeId - - max node id in the result set - exclusive
        Returns:
        IDs of the nodes
      • getNodesByTypeUriId

        public java.util.List<java.lang.Long> getNodesByTypeUriId​(java.lang.Long nsId,
                                                                  java.lang.Long minNodeId,
                                                                  java.lang.Long maxNodeId)
        Description copied from interface: PatchDAO
        Find all the nodes ids with the given type uri
        Parameters:
        nsId - - the id of the type qname uri
        minNodeId - - min node id in the result set - inclusive
        maxNodeId - - max node id in the result set - exclusive
        Returns:
        IDs of the nodes
      • getNodesByAspectQNameId

        public java.util.List<java.lang.Long> getNodesByAspectQNameId​(java.lang.Long aspectQNameId,
                                                                      java.lang.Long minNodeId,
                                                                      java.lang.Long maxNodeId)
        Description copied from interface: PatchDAO
        Find all the nodes ids with the given aspect
        Parameters:
        aspectQNameId - - the id of the aspect qname
        minNodeId - - min node id in the result set - inclusive
        maxNodeId - - max node id in the result set - exclusive
        Returns:
        IDs of the nodes
      • getNodesByContentPropertyMimetypeId

        public java.util.List<java.lang.Long> getNodesByContentPropertyMimetypeId​(java.lang.Long mimetypeId,
                                                                                  java.lang.Long minNodeId,
                                                                                  java.lang.Long maxNodeId)
        Description copied from interface: PatchDAO
        Find all the nodes ids with the given content property set with the given mimetype
        Parameters:
        mimetypeId - - the id of the content data mimetype
        minNodeId - - min node id in the result set - inclusive
        maxNodeId - - max node id in the result set - exclusive
        Returns:
        IDs of the nodes
      • getNodesByTypeQNameAndAspectQNameId

        public java.util.List<java.lang.Long> getNodesByTypeQNameAndAspectQNameId​(long typeQNameId,
                                                                                  long aspectQNameId,
                                                                                  long minNodeId,
                                                                                  long maxNodeId)
        Description copied from interface: PatchDAO
        Find all the nodes ids with the given aspect and type
        Parameters:
        typeQNameId - - the id of the type qname
        aspectQNameId - - the id of the aspect qname
        minNodeId - - min node id in the result set - inclusive
        maxNodeId - - max node id in the result set - exclusive
        Returns:
        List
      • getCountNodesWithTypId

        public long getCountNodesWithTypId​(org.alfresco.service.namespace.QName typeQName)
        Description copied from interface: PatchDAO
        Gets the total number of nodes which match the given Type QName.
        Parameters:
        typeQName - the qname to search for
        Returns:
        count of nodes that match the typeQName
      • getChildrenOfTheSharedSurfConfigFolder

        public java.util.List<org.alfresco.service.cmr.repository.NodeRef> getChildrenOfTheSharedSurfConfigFolder​(java.lang.Long minNodeId,
                                                                                                                  java.lang.Long maxNodeId)
        Description copied from interface: PatchDAO
        Finds folders of the shared surf-config (for all tenants):
        • company_home/sites/surf-config/components
        • company_home/sites/surf-config/pages
        • company_home/sites/surf-config/pages/user
        • company_home/sites/surf-config/pages/user{userId}
        Parameters:
        minNodeId - - min node id in the result set - inclusive
        maxNodeId - - max node id in the result set - exclusive
        Returns:
        list of children nodeRefs