001/**
002 * Copyright 2005-2018 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.core.framework.persistence.ojb;
017
018import org.apache.ojb.broker.query.Criteria;
019import org.apache.ojb.broker.query.QueryByCriteria;
020
021/**
022 * QueryByCriteria subclass that introduces a suffix that the SqlGenerator should
023 * append onto the end of the generated sql statement.
024 * This is a hack to introduce select-for-update functionality into OJB so the same ORM/Criteria abstractions
025 * can be retained for select-for-update queries.  Select for update appears to have been added in the OJB
026 * source repository, so maybe a forthcoming release will include this functionality and these kludges can be
027 * removed.
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030@Deprecated
031public class SuffixableQueryByCriteria extends QueryByCriteria {
032    protected String suffix;
033
034    public SuffixableQueryByCriteria(Class targetClass, Criteria criteria, boolean distinct) {
035        super(targetClass, criteria, distinct);
036    }
037
038    public SuffixableQueryByCriteria(Class targetClass, Criteria whereCriteria, Criteria havingCriteria, boolean distinct) {
039        super(targetClass, whereCriteria, havingCriteria, distinct);
040    }
041
042    public SuffixableQueryByCriteria(Class targetClass, Criteria whereCriteria, Criteria havingCriteria) {
043        super(targetClass, whereCriteria, havingCriteria);
044    }
045
046    public SuffixableQueryByCriteria(Class targetClass, Criteria criteria) {
047        super(targetClass, criteria);
048    }
049
050    public SuffixableQueryByCriteria(Class classToSearchFrom) {
051        super(classToSearchFrom);
052    }
053
054    public SuffixableQueryByCriteria(Object anObject, boolean distinct) {
055        super(anObject, distinct);
056    }
057
058    public SuffixableQueryByCriteria(Object anObject) {
059        super(anObject);
060    }
061
062    public void setQuerySuffix(String suffix) {
063        this.suffix = suffix;
064    }
065    
066    public String getQuerySuffix() {
067        return suffix;
068    }
069}