/** * PUBLIC: * Return the queryManager. * The query manager can be used to specify customization of the SQL * that generates for this descriptor. */ public DescriptorQueryManager getDescriptorQueryManager() { return this.getQueryManager(); }
/** * PUBLIC: * Return the queryManager. * The query manager can be used to specify customization of the SQL * that generates for this descriptor. */ public DescriptorQueryManager getDescriptorQueryManager() { return this.getQueryManager(); }
/** * PUBLIC: * Return the queryManager. * The query manager can be used to specify customization of the SQL * that generates for this descriptor. */ public DescriptorQueryManager getDescriptorQueryManager() { return this.getQueryManager(); }
/** * INTERNAL: * Returns true is an additional criteria has been set on this descriptor's * query manager. */ public boolean hasAdditionalCriteria() { return m_descriptor.getQueryManager().hasAdditionalCriteria(); }
/** * Convenience method */ protected DescriptorQueryManager getQueryManager(Object attributeValue, AbstractSession session) { return getReferenceDescriptor(attributeValue, session).getQueryManager(); }
/** * INTERNAL: * OBSOLETE - old reader. * This method is explicitly used by the Builder only. */ public void setExistenceChecking(String token) throws DescriptorException { getQueryManager().setExistenceCheck(token); }
/** * PUBLIC: * Switch all descriptors to check the cache for existence. */ public void checkCacheForDoesExist() { Iterator descriptors = getDescriptors().values().iterator(); while (descriptors.hasNext()) { ClassDescriptor descriptor = (ClassDescriptor)descriptors.next(); descriptor.getQueryManager().checkCacheForDoesExist(); } }
/** * PUBLIC: * Switch all descriptors to assume existence for non-null primary keys. */ public void assumeExistenceForDoesExist() { Iterator descriptors = getDescriptors().values().iterator(); while (descriptors.hasNext()) { ClassDescriptor descriptor = (ClassDescriptor)descriptors.next(); descriptor.getQueryManager().assumeExistenceForDoesExist(); } }
/** * PUBLIC: * Switch all descriptors to check the cache for existence. */ public void checkCacheForDoesExist() { Iterator descriptors = getDescriptors().values().iterator(); while (descriptors.hasNext()) { ClassDescriptor descriptor = (ClassDescriptor)descriptors.next(); descriptor.getQueryManager().checkCacheForDoesExist(); } }
/** * PUBLIC: * Switch all descriptors to assume existence for non-null primary keys. */ public void assumeExistenceForDoesExist() { Iterator descriptors = getDescriptors().values().iterator(); while (descriptors.hasNext()) { ClassDescriptor descriptor = (ClassDescriptor)descriptors.next(); descriptor.getQueryManager().assumeExistenceForDoesExist(); } }
/** * PUBLIC: * Switch all descriptors to check the database for existence. */ public void checkDatabaseForDoesExist() { Iterator descriptors = getDescriptors().values().iterator(); while (descriptors.hasNext()) { ClassDescriptor descriptor = (ClassDescriptor)descriptors.next(); descriptor.getQueryManager().checkDatabaseForDoesExist(); } }
/** * INTERNAL: */ public void process(MetadataDescriptor descriptor) { // Set the criteria (jpql fragment) on the descriptors query event // manager. The JPQL fragment will be parsed during descriptor post // initialization. descriptor.getClassDescriptor().getQueryManager().setAdditionalCriteria(m_criteria); }
/** * Insert the object using the user defined query. * This ensures that the query is cloned and prepared correctly. */ protected void performUserDefinedInsert() { performUserDefinedWrite(getDescriptor().getQueryManager().getInsertQuery()); }
/** * Insert the object using the user defined query. * This ensures that the query is cloned and prepared correctly. */ protected void performUserDefinedInsert() { performUserDefinedWrite(getDescriptor().getQueryManager().getInsertQuery()); }
/** * Update the object using the user defined query. * This ensures that the query is cloned and prepared correctly. */ protected void performUserDefinedUpdate() { performUserDefinedWrite(getDescriptor().getQueryManager().getUpdateQuery()); }
/** * PUBLIC: * Return true if this descriptor should using an additional join expresison. */ public boolean shouldUseAdditionalJoinExpression() { // Return true, if the query manager has an additional join expression // and this descriptor is not part of an inheritance hierarchy using a // view (CR#3701077) return ((getQueryManager().getAdditionalJoinExpression() != null) && ! (hasInheritance() && getInheritancePolicy().hasView())); }
/** * ADVANCED: * Clear the query cache associated with the named query on the descriptor for the given class */ public void clearQueryCache(String descriptorQueryName, Class queryClass) { getIdentityMapManager().clearQueryCache((ReadQuery)session.getDescriptor(queryClass).getQueryManager().getQuery(descriptorQueryName)); }
/** * ADVANCED: * Clear the query cache associated with the named query on the descriptor for the given class */ public void clearQueryCache(String descriptorQueryName, Class queryClass) { getIdentityMapManager().clearQueryCache((ReadQuery)session.getDescriptor(queryClass).getQueryManager().getQuery(descriptorQueryName)); }
/** * ADVANCED: * Clear the query cache associated with the named query on the descriptor for the given class */ @Override public void clearQueryCache(String descriptorQueryName, Class queryClass) { ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessor().clearQueryCache((ReadQuery)session.getDescriptor(queryClass).getQueryManager().getQuery(descriptorQueryName)); }
/** * ADVANCED: * Clear the query cache associated with the named query on the descriptor for the given class */ public void clearQueryCache(String descriptorQueryName, Class queryClass) { ((UnitOfWorkImpl)getSession()).getParent().getIdentityMapAccessor().clearQueryCache((ReadQuery)session.getDescriptor(queryClass).getQueryManager().getQuery(descriptorQueryName)); }