/*
* JFolder, Copyright 2001-2006 Gary Steinmetz
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jfolder.workflow.lifecycle;
//base classes
import java.util.ArrayList;
//project specific classes
import org.jfolder.workflow.query.BaseDBQueryVendor;
import org.jfolder.workflow.query.BaseDBQueryVendorProprietarySyntax;
import org.jfolder.workflow.query.StringQueryContainer;
//other classes
/*
public class HSQLQueryVendorProprietarySyntax
implements BaseDBQueryVendorProprietarySyntax {
private String OR_CONJUNCTION = " OR ";
private String AND_CONJUNCTION = " AND ";
public HSQLQueryVendorProprietarySyntax() {
}
public void constructStringIsEqualClause(StringBuffer inSb,
ArrayList inParameters, StringQueryContainer inSqc) {
//if (BaseDBQueryVendor.STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.STRING_VALUE + " = ?");
//}
//else {
// if (BaseDBQueryVendor.LONG_STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.LONG_STRING_VALUE + " = ?");
// }
//}
prepareQuery(inSb, " = ?", OR_CONJUNCTION);
inParameters.add(inSqc.getStringValue());
inParameters.add(inSqc.getStringValue());
}
public void constructStringIsLikeClause(StringBuffer inSb,
ArrayList inParameters, StringQueryContainer inSqc) {
//if (BaseDBQueryVendor.STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.STRING_VALUE + " LIKE ?");
//}
//else {
// if (BaseDBQueryVendor.LONG_STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.LONG_STRING_VALUE + " LIKE ?");
// }
//}
prepareQuery(inSb, " LIKE ?", OR_CONJUNCTION);
inParameters.add(inSqc.getStringValue());
inParameters.add(inSqc.getStringValue());
}
public void constructStringIsNotEqualClause(StringBuffer inSb,
ArrayList inParameters, StringQueryContainer inSqc) {
//if (BaseDBQueryVendor.STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.STRING_VALUE + " <> ?");
//}
//else {
// if (BaseDBQueryVendor.LONG_STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.LONG_STRING_VALUE + " <> ?");
// }
//}
prepareQuery(inSb, " <> ?", AND_CONJUNCTION);
inParameters.add(inSqc.getStringValue());
inParameters.add(inSqc.getStringValue());
}
public void constructStringIsNotLikeClause(StringBuffer inSb,
ArrayList inParameters, StringQueryContainer inSqc) {
//if (BaseDBQueryVendor.STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.STRING_VALUE + " NOT LIKE ?");
//}
//else {
// if (BaseDBQueryVendor.LONG_STRING_VALUE != null) {
// inSb.append(BaseDBQueryVendor.LONG_STRING_VALUE
// + " NOT LIKE ?");
// }
//}
prepareQuery(inSb, " NOT LIKE ?", AND_CONJUNCTION);
inParameters.add(inSqc.getStringValue());
inParameters.add(inSqc.getStringValue());
}
private void prepareQuery(StringBuffer inSb, String inPattern,
String inConjunction) {
inSb.append("(");
inSb.append(BaseDBQueryVendor.STRING_VALUE);
inSb.append(inPattern);
inSb.append(inConjunction);
inSb.append(BaseDBQueryVendor.LONG_STRING_VALUE);
inSb.append(inPattern);
inSb.append(")");
}
}*/
|