/** * ADVANCED: * Return the receiver's read-all call. * This allows the user to override the read-all operation. */ public Call getReadAllCall() { if (getReadAllQuery() == null) { return null; } return getReadAllQuery().getDatasourceCall(); }
/** * ADVANCED: * Return the receiver's read-all call. * This allows the user to override the read-all operation. */ public Call getReadAllCall() { if (getReadAllQuery() == null) { return null; } return getReadAllQuery().getDatasourceCall(); }
/** * ADVANCED: * Return the receiver's read-all call. * This allows the user to override the read-all operation. */ public Call getReadAllCall() { if (getReadAllQuery() == null) { return null; } return getReadAllQuery().getDatasourceCall(); }
/** * ADVANCED: * Return the receiver's read SQL string. * This allows the user to override the SQL generated by EclipseLink, with their own SQL or procedure call. * The arguments are translated from the fields of the read arguments row, * through replacing the field names marked by '#' with the values for those fields. * Note that this is only used on readAllObjects(Class), and not when an expression is provided. * <p> * Example, "select * from EMPLOYEE" */ public String getReadAllSQLString() { if (getReadAllQuery() == null) { return null; } return getReadAllQuery().getSQLString(); }
/** * ADVANCED: * Return the receiver's read SQL string. * This allows the user to override the SQL generated by EclipseLink, with their own SQL or procedure call. * The arguments are translated from the fields of the read arguments row, * through replacing the field names marked by '#' with the values for those fields. * Note that this is only used on readAllObjects(Class), and not when an expression is provided. * <p> * Example, "select * from EMPLOYEE" */ public String getReadAllSQLString() { if (getReadAllQuery() == null) { return null; } return getReadAllQuery().getSQLString(); }
/** * ADVANCED: * Return the receiver's read SQL string. * This allows the user to override the SQL generated by EclipseLink, with their own SQL or procedure call. * The arguments are translated from the fields of the read arguments row, * through replacing the field names marked by '#' with the values for those fields. * Note that this is only used on readAllObjects(Class), and not when an expression is provided. * <p> * Example, "select * from EMPLOYEE" */ public String getReadAllSQLString() { if (getReadAllQuery() == null) { return null; } return getReadAllQuery().getSQLString(); }
/** * INTERNAL: * Get custom all read query from query manager. * Called from {@link #checkForCustomQuery(AbstractSession, AbstractRecord)} to retrieve custom read query. * @return Custom all read query from query manager. */ @Override protected ObjectLevelReadQuery getReadQuery() { return descriptor.getQueryManager().getReadAllQuery(); }
/** * INTERNAL: * Convert all the class-name-based settings in this Query Manager to actual class-based * settings * This method is implemented by subclasses as necessary. * @param classLoader */ public void convertClassNamesToClasses(ClassLoader classLoader){ Iterator queryVectors = getQueries().values().iterator(); while (queryVectors.hasNext()){ Iterator queries = ((Vector)queryVectors.next()).iterator();; while (queries.hasNext()){ ((DatabaseQuery)queries.next()).convertClassNamesToClasses(classLoader); } } if (getReadObjectQuery() != null) { getReadObjectQuery().convertClassNamesToClasses(classLoader); } if (getReadAllQuery() != null) { getReadAllQuery().convertClassNamesToClasses(classLoader); } };
/** * INTERNAL: * Convert all the class-name-based settings in this Query Manager to actual class-based * settings * This method is implemented by subclasses as necessary. * @param classLoader */ public void convertClassNamesToClasses(ClassLoader classLoader){ Iterator queryVectors = getQueries().values().iterator(); while (queryVectors.hasNext()){ Iterator queries = ((Vector)queryVectors.next()).iterator();; while (queries.hasNext()){ ((DatabaseQuery)queries.next()).convertClassNamesToClasses(classLoader); } } if (getReadObjectQuery() != null) { getReadObjectQuery().convertClassNamesToClasses(classLoader); } if (getReadAllQuery() != null) { getReadAllQuery().convertClassNamesToClasses(classLoader); } };
/** * INTERNAL: * Convert all the class-name-based settings in this Query Manager to actual class-based * settings * This method is implemented by subclasses as necessary. * @param classLoader */ public void convertClassNamesToClasses(ClassLoader classLoader){ Iterator queryVectors = getQueries().values().iterator(); while (queryVectors.hasNext()){ Iterator queries = ((Vector)queryVectors.next()).iterator();; while (queries.hasNext()){ ((DatabaseQuery)queries.next()).convertClassNamesToClasses(classLoader); } } if (getReadObjectQuery() != null) { getReadObjectQuery().convertClassNamesToClasses(classLoader); } if (getReadAllQuery() != null) { getReadAllQuery().convertClassNamesToClasses(classLoader); } };
if (getReadAllQuery() != null) { manager.setReadAllQuery((ReadAllQuery)getReadAllQuery().clone());
if (getReadAllQuery() != null) { manager.setReadAllQuery((ReadAllQuery)getReadAllQuery().clone());
getDeleteQuery().setDescriptor(descriptor); if (getReadAllQuery() != null) { getReadAllQuery().setReferenceClass(getDescriptor().getJavaClass()); getReadAllQuery().setDescriptor(descriptor);
getDeleteQuery().setDescriptor(descriptor); if (getReadAllQuery() != null) { getReadAllQuery().setReferenceClass(getDescriptor().getJavaClass()); getReadAllQuery().setDescriptor(descriptor);
getDeleteQuery().setDescriptor(descriptor); if (getReadAllQuery() != null) { getReadAllQuery().setReferenceClass(getDescriptor().getJavaClass()); getReadAllQuery().setDescriptor(descriptor);
/** * INTERNAL: * Check to see if a custom query should be used for this query. * This is done before the query is copied and prepared/executed. * null means there is none. */ protected DatabaseQuery checkForCustomQuery(AbstractSession session, AbstractRecord translationRow) { checkDescriptor(session); // Check if user defined a custom query. if (isCustomQueryUsed() == null) { setIsCustomQueryUsed((!isUserDefined()) && isExpressionQuery() && (getSelectionCriteria() == null) && (!hasOrderByExpressions()) && (this.descriptor.getQueryManager().hasReadAllQuery())); } if (isCustomQueryUsed().booleanValue()) { return this.descriptor.getQueryManager().getReadAllQuery(); } else { return null; } }
/** * INTERNAL: * Check to see if a custom query should be used for this query. * This is done before the query is copied and prepared/executed. * null means there is none. */ @Override protected DatabaseQuery checkForCustomQuery(AbstractSession session, AbstractRecord translationRow) { Boolean useCustomQuery = isCustomQueryUsed; checkDescriptor(session); // Check if user defined a custom query. if (useCustomQuery == null) { setIsCustomQueryUsed((!isUserDefined()) && isExpressionQuery() && (getSelectionCriteria() == null) && isDefaultPropertiesQuery() && (!hasOrderByExpressions()) && (this.descriptor.getQueryManager().hasReadAllQuery())); // Value of isCustomQueryUsed is updated by setIsCustomQueryUsed method. useCustomQuery = isCustomQueryUsed; } if (useCustomQuery != null && useCustomQuery.booleanValue()) { ReadAllQuery customQuery = this.descriptor.getQueryManager().getReadAllQuery(); if (this.accessors != null) { customQuery = (ReadAllQuery) customQuery.clone(); customQuery.setIsExecutionClone(true); customQuery.setAccessors(this.accessors); } isCustomQueryUsed = useCustomQuery; return customQuery; } isCustomQueryUsed = useCustomQuery; return null; }
setReadAllQuery((ReadAllQuery)parentQueryManager.getReadAllQuery().clone());
setReadAllQuery((ReadAllQuery)parentQueryManager.getReadAllQuery().clone());
setReadAllQuery((ReadAllQuery)parentQueryManager.getReadAllQuery().clone());