com.wewebu.ow.server.field
Class OwSearchSQLPreparedStatementOperator

java.lang.Object
  extended by com.wewebu.ow.server.field.OwSearchSQLOperator
      extended by com.wewebu.ow.server.field.OwSearchSQLPreparedStatementOperator

public class OwSearchSQLPreparedStatementOperator
extends OwSearchSQLOperator

Operator to create SQL out of a OwSearchNode Tree using prepared statements.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Nested Class Summary
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.field.OwSearchSQLOperator
OwSearchSQLOperator.SqlOperatorSingleton
 
Field Summary
protected  ArrayList m_parameterBindings
          ArrayList to collect all parameter values
 
Fields inherited from class com.wewebu.ow.server.field.OwSearchSQLOperator
DATE_MODE_DB2, DATE_MODE_DEFAULT, DATE_MODE_FNCM, DATE_MODE_FNIM, DATE_MODE_MS_ACCESS, DATE_MODE_MSSQL, DATE_MODE_ORACLE, DATE_MODE_TREAT_IGNORE_TIME_AS_RANGE, m_iMode, m_SqlOperators
 
Constructor Summary
OwSearchSQLPreparedStatementOperator()
          Default constructor
 
Method Summary
 Object[] getParameterBindings()
          Get an array with real values for each ? in the query string
protected  String getSQLValueString(OwSearchCriteria criteria_p, Object value_p, int dateMode_p)
          override the default behavior to insert ? instead of real values.
 
Methods inherited from class com.wewebu.ow.server.field.OwSearchSQLOperator
convertWildCards, createSQLSearchCriteria, getCriteriaQueryName, getDateMode, getOperatorSQL, getSingleOperatorSQL, getSQLOperatorAsString, getStringValue, isOperatorFieldFirst, isStringLiteral, setDateFormats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_parameterBindings

protected ArrayList m_parameterBindings
ArrayList to collect all parameter values

Constructor Detail

OwSearchSQLPreparedStatementOperator

public OwSearchSQLPreparedStatementOperator()
Default constructor

Method Detail

getSQLValueString

protected String getSQLValueString(OwSearchCriteria criteria_p,
                                   Object value_p,
                                   int dateMode_p)
                            throws Exception
override the default behavior to insert ? instead of real values. The values are all collected in the m_parameterBindings array.

Overrides:
getSQLValueString in class OwSearchSQLOperator
Parameters:
criteria_p - the criteria to convert
dateMode_p - int Date mode used to convert date types as defined with DATE_MODE_...
Returns:
String with SQL conform representation of value
Throws:
Exception

getParameterBindings

public Object[] getParameterBindings()
Get an array with real values for each ? in the query string

Returns:
Object[] array of values for each ? in the query string


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.