Class DBQuery

  • All Implemented Interfaces:
    DBQueryBuilderComponent, org.alfresco.repo.search.impl.querymodel.Query

    public class DBQuery
    extends org.alfresco.repo.search.impl.querymodel.impl.BaseQuery
    implements DBQueryBuilderComponent
    Author:
    Andy
    • Constructor Detail

      • DBQuery

        public DBQuery​(List<org.alfresco.repo.search.impl.querymodel.Column> columns,
                       org.alfresco.repo.search.impl.querymodel.Source source,
                       org.alfresco.repo.search.impl.querymodel.Constraint constraint,
                       List<org.alfresco.repo.search.impl.querymodel.Ordering> orderings)
        Parameters:
        source - Source
        constraint - Constraint
    • Method Detail

      • getStoreId

        public Long getStoreId()
        Returns:
        the storeId
      • setStoreId

        public void setStoreId​(Long storeId)
        Parameters:
        storeId - the storeId to set
      • getSysDeletedType

        public Long getSysDeletedType()
        Returns:
        the sysDeletedType
      • setSysDeletedType

        public void setSysDeletedType​(Long sysDeletedType)
        Parameters:
        sysDeletedType - the sysDeletedType to set
      • getSinceTxId

        public Long getSinceTxId()
        Returns:
        the sinceTxId
      • setSinceTxId

        public void setSinceTxId​(Long sinceTxId)
        Parameters:
        sinceTxId - the sinceTxId to set
      • getHasPredicate

        public boolean getHasPredicate()
      • getHasOrderBy

        public boolean getHasOrderBy()
      • getHasPredicatePartsOrder

        public boolean getHasPredicatePartsOrder()
      • prepare

        public void prepare​(org.alfresco.service.namespace.NamespaceService namespaceService,
                            org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                            QNameDAO qnameDAO,
                            NodeDAO nodeDAO,
                            org.alfresco.repo.tenant.TenantService tenantService,
                            Set<String> selectors,
                            Map<String,​org.alfresco.repo.search.impl.querymodel.Argument> functionArgs,
                            org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext functionContext,
                            boolean supportBooleanFloatAndDouble)
        Description copied from interface: DBQueryBuilderComponent
        Use the dictionary to expand any terms, deal with multi-valued properties, etc Use the QNameDAO to look up any ids
        Specified by:
        prepare in interface DBQueryBuilderComponent
        Parameters:
        namespaceService - NamespaceService
        dictionaryService - DictionaryService
        qnameDAO - QNameDAO
        nodeDAO - NodeDAO
        tenantService - TenantService
        functionContext - FunctionEvaluationContext
      • getUUIDs

        public static String[] getUUIDs​(String[] source)
      • getDbid

        public static Long getDbid​(String source,
                                   NodeDAO nodeDAO,
                                   org.alfresco.repo.tenant.TenantService tenantService)
      • findTypeIds

        public static List<Long> findTypeIds​(String type,
                                             org.alfresco.service.namespace.NamespaceService namespaceService,
                                             org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                             QNameDAO qnameDAO,
                                             boolean exact)
      • findAspectIds

        public static List<Long> findAspectIds​(String aspect,
                                               org.alfresco.service.namespace.NamespaceService namespaceService,
                                               org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                               QNameDAO qnameDAO,
                                               boolean exact)
      • toStringValues

        public static String[] toStringValues​(Collection<?> objects)
      • toStringValues

        public static String[] toStringValues​(Object[] objects)
      • expandQName

        public static String expandQName​(String toStrip,
                                         org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
      • matchURI

        public static String matchURI​(String prefix,
                                      org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
      • matchTypeDefinition

        public static org.alfresco.service.cmr.dictionary.TypeDefinition matchTypeDefinition​(String string,
                                                                                             org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver,
                                                                                             org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      • matchAspectDefinition

        public static org.alfresco.service.cmr.dictionary.AspectDefinition matchAspectDefinition​(String string,
                                                                                                 org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver,
                                                                                                 org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      • getJoinCommandType

        public static DBQueryBuilderJoinCommandType getJoinCommandType​(org.alfresco.service.namespace.QName propertyQName)
        Parameters:
        propertyQName - QName
        Returns:
        DBQueryBuilderJoinCommandType
      • getFieldName

        public static String getFieldName​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                          org.alfresco.service.namespace.QName propertyQName,
                                          boolean supportBooleanFloatAndDouble)
        Parameters:
        dictionaryService - DictionaryService
        propertyQName - QName
        Returns:
        String
      • getDataTypeDefinition

        public static org.alfresco.service.cmr.dictionary.DataTypeDefinition getDataTypeDefinition​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                                                                                   org.alfresco.service.namespace.QName propertyQname)
      • getDbids

        public static Long[] getDbids​(String[] stringValues,
                                      NodeDAO nodeDAO,
                                      org.alfresco.repo.tenant.TenantService tenantService)
        Parameters:
        stringValues - String[]
        nodeDAO - NodeDAO
        tenantService - TenantService
        Returns:
        Long[]