Package org.eclipse.persistence.queries

Examples of org.eclipse.persistence.queries.DataModifyQuery.copyFromQuery()


     */
    protected void setAsSQLModifyQuery() {
        if (getDatabaseQueryInternal().isDataReadQuery()) {
            DataModifyQuery query = new DataModifyQuery();
            query.setIsUserDefined(this.databaseQuery.isUserDefined());
            query.copyFromQuery(this.databaseQuery);
            // Need to clone call, in case was executed as read.
            query.setDatasourceCall((Call) this.databaseQuery.getDatasourceCall().clone());
            this.databaseQuery = query;
        }
    }
View Full Code Here


     * Change the internal query to data modify query.
     */
    protected void setAsDataModifyQuery() {
        DataModifyQuery query = new DataModifyQuery();
        query.setIsUserDefined(this.databaseQuery.isUserDefined());
        query.copyFromQuery(this.databaseQuery);
        // Need to clone call, in case was executed as read.
        query.setDatasourceCall((Call) this.databaseQuery.getDatasourceCall().clone());
        this.databaseQuery = query;
    }
   
View Full Code Here

        }
   
        DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
            if (query.isDataReadQuery()) {               
                DataModifyQuery newQuery = new DataModifyQuery();
                newQuery.copyFromQuery(query);
                newQuery.setIsBatchExecutionSupported(((Boolean)valueToApply).booleanValue());
                return newQuery;
            } else if (query.isModifyQuery()) {
                ((ModifyQuery)query).setIsBatchExecutionSupported(((Boolean)valueToApply).booleanValue());
            } else {
View Full Code Here

     */
    protected void setAsSQLModifyQuery() {
        if (getDatabaseQueryInternal().isDataReadQuery()) {
            DataModifyQuery query = new DataModifyQuery();
            query.setIsUserDefined(this.databaseQuery.isUserDefined());
            query.copyFromQuery(this.databaseQuery);
            // Need to clone call, in case was executed as read.
            query.setDatasourceCall((Call) this.databaseQuery.getDatasourceCall().clone());
            this.databaseQuery = query;
        }
    }
View Full Code Here

     */
    protected void setAsSQLModifyQuery() {
        if (getDatabaseQueryInternal().isDataReadQuery()) {
            DataModifyQuery query = new DataModifyQuery();
            query.setIsUserDefined(this.databaseQuery.isUserDefined());
            query.copyFromQuery(this.databaseQuery);
            // Need to clone call, in case was executed as read.
            query.setDatasourceCall((Call) this.databaseQuery.getDatasourceCall().clone());
            this.databaseQuery = query;
        }
    }
View Full Code Here

     */
    protected void setAsSQLModifyQuery() {
        if (getDatabaseQueryInternal().isDataReadQuery()) {
            DataModifyQuery query = new DataModifyQuery();
            query.setIsUserDefined(this.databaseQuery.isUserDefined());
            query.copyFromQuery(this.databaseQuery);
            // Need to clone call, in case was executed as read.
            query.setDatasourceCall((Call) this.databaseQuery.getDatasourceCall().clone());
            this.databaseQuery = query;
        }
    }
View Full Code Here

        }
   
        DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
            if (query.isDataReadQuery()) {               
                DataModifyQuery newQuery = new DataModifyQuery();
                newQuery.copyFromQuery(query);
                newQuery.setIsBatchExecutionSupported(((Boolean)valueToApply).booleanValue());
                return newQuery;
            } else if (query.isModifyQuery()) {
                ((ModifyQuery)query).setIsBatchExecutionSupported(((Boolean)valueToApply).booleanValue());
            } else {
View Full Code Here

    protected void setAsDataModifyQuery() {
        DataModifyQuery query = new DataModifyQuery();
        query.setIsUserDefined(this.databaseQuery.isUserDefined());
        // By default, do not batch user native queries, as row count must be returned.
        query.setIsBatchExecutionSupported(false);
        query.copyFromQuery(this.databaseQuery);
        // Need to clone call, in case was executed as read.
        query.setDatasourceCall((Call) this.databaseQuery.getDatasourceCall().clone());
        this.databaseQuery = query;
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.