WebObjects 5.4.2

com.webobjects.jdbcadaptor
Class DerbyPlugIn.DerbyExpression

java.lang.Object
  extended by com.webobjects.eoaccess.EOSQLExpression
      extended by com.webobjects.jdbcadaptor.JDBCExpression
          extended by com.webobjects.jdbcadaptor.DerbyPlugIn.DerbyExpression
Enclosing class:
DerbyPlugIn

public static class DerbyPlugIn.DerbyExpression
extends JDBCExpression


Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.eoaccess.EOSQLExpression
EOSQLExpression.SQLValue
 
Field Summary
 
Fields inherited from class com.webobjects.eoaccess.EOSQLExpression
BindVariableAttributeKey, BindVariableColumnKey, BindVariableNameKey, BindVariablePlaceHolderKey, BindVariableValueKey
 
Constructor Summary
DerbyPlugIn.DerbyExpression(EOEntity entity)
           
 
Method Summary
 String assembleUpdateStatementWithRow(NSDictionary row, EOQualifier qualifier, String tableList, String updateList, String whereClause)
          This method is invoked from prepareUpdateExpressionWithRow to return an SQL UPDATE statement.
 String formatValueForAttribute(Object value, EOAttribute attribute)
          This method should be overridden by subclasses to return a string representation of value suitable for use in an SQL statement, depending on attribute's externalType.
 boolean mustUseBindVariableForAttribute(EOAttribute att)
          Returns true if the receiver must use bind variables for attribute, false otherwise.
 boolean shouldUseBindVariableForAttribute(EOAttribute att)
          Returns true if the receiver can provide a bind variable dictionary for attribute, false otherwise.
 
Methods inherited from class com.webobjects.jdbcadaptor.JDBCExpression
addSelectListAttribute, allowsNullClauseForConstraint, appendItemToListString, appendItemToOrderByString, appendItemToValueListString, bindVariableDictionaryForAttribute, columnTypeStringForAttribute, externalNameQuoteCharacter, jdbcInfo, lockClause, prepareSelectExpressionWithAttributes, setJDBCInfo, useBindVariables
 
Methods inherited from class com.webobjects.eoaccess.EOSQLExpression
addBindVariableDictionary, addCreateClauseForAttribute, addInsertListAttribute, addJoinClause, addOrderByAttributeOrdering, addUpdateListAttribute, aliasesByRelationshipPath, appendItemToListString, assembleDeleteStatementWithQualifier, assembleInsertStatementWithRow, assembleJoinClause, assembleSelectStatementWithAttributes, bindVariableDictionaries, entity, formatSQLString, formatStringValue, joinClauseString, joinExpression, listString, orderByString, prepareConstraintStatementForRelationship, prepareDeleteExpressionForQualifier, prepareInsertExpressionWithRow, prepareUpdateExpressionWithRow, setStatement, setUseAliases, setUseBindVariables, setUseQuotedExternalNames, sqlEscapeChar, sqlPatternFromShellPattern, sqlPatternFromShellPatternWithEscapeCharacter, sqlStringForAttribute, sqlStringForAttributeNamed, sqlStringForAttributePath, sqlStringForCaseInsensitiveLike, sqlStringForConjoinedQualifiers, sqlStringForData, sqlStringForDisjoinedQualifiers, sqlStringForKeyComparisonQualifier, sqlStringForKeyValueQualifier, sqlStringForNegatedQualifier, sqlStringForNumber, sqlStringForQualifier, sqlStringForSchemaObjectName, sqlStringForSelector, sqlStringForString, sqlStringForValue, statement, tableListWithRootEntity, toString, useAliases, useQuotedExternalNames, valueList, whereClauseString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DerbyPlugIn.DerbyExpression

public DerbyPlugIn.DerbyExpression(EOEntity entity)
Method Detail

shouldUseBindVariableForAttribute

public boolean shouldUseBindVariableForAttribute(EOAttribute att)
Description copied from class: EOSQLExpression
Returns true if the receiver can provide a bind variable dictionary for attribute, false otherwise. Bind variables aren't used for values associated with this attribute when useBindVariables returns false. EOSQLExpression's implementation returns false. An SQL expression subclass should override this method to return true if the receiver should use bind variables for attributes with attribute's external type. It should also return true for any attribute for which the receiver must use bind variables.

Overrides:
shouldUseBindVariableForAttribute in class JDBCExpression
Parameters:
att - the EOAttribute associated with the bind variable dictionary
Returns:
always true for JDBC
See Also:
EOSQLExpression.mustUseBindVariableForAttribute(EOAttribute attribute), EOSQLExpression.useBindVariables()

mustUseBindVariableForAttribute

public boolean mustUseBindVariableForAttribute(EOAttribute att)
Description copied from class: EOSQLExpression
Returns true if the receiver must use bind variables for attribute, false otherwise. EOSQLExpression's implementation returns false. An SQL expression subclass that uses bind variables should override this method to return true if the underlying RDBMS requires that bind variables be used for attributes with attribute's external type.

Overrides:
mustUseBindVariableForAttribute in class JDBCExpression
Parameters:
att - the EOAttribute associated with the bind variable dictionary
Returns:
always true for JDBC
See Also:
EOSQLExpression.shouldUseBindVariableForAttribute(EOAttribute anEOAttribute), EOSQLExpression.bindVariableDictionaryForAttribute(EOAttribute attribute, Object value)

formatValueForAttribute

public String formatValueForAttribute(Object value,
                                      EOAttribute attribute)
Description copied from class: EOSQLExpression
This method should be overridden by subclasses to return a string representation of value suitable for use in an SQL statement, depending on attribute's externalType. For example, a subclass might format a date using a special database-specific syntax or standard form or truncate numbers to attribute's precision and scale. EOSQLExpression's implementation merely returns the string representation of value.

Overrides:
formatValueForAttribute in class JDBCExpression
Parameters:
value - an object to be used in a SQL statement
attribute - an EOAttribute to be used in influencing the format
Returns:
a formatted string
See Also:
EOAttribute

assembleUpdateStatementWithRow

public String assembleUpdateStatementWithRow(NSDictionary row,
                                             EOQualifier qualifier,
                                             String tableList,
                                             String updateList,
                                             String whereClause)
Description copied from class: EOSQLExpression
This method is invoked from prepareUpdateExpressionWithRow to return an SQL UPDATE statement. The statement is of the form:
         UPDATE tableList
         SET updateList
         WHERE whereClause
 
row and qualifier are the arguments to prepareUpdateExpressionWithRow from which updateList and whereClause were derived. They are provided for subclasses that need to generate the clauses of the UPDATE statement in a particular way.

Overrides:
assembleUpdateStatementWithRow in class EOSQLExpression
Parameters:
row - an NSDictionary containing the row data
qualifier - an EOQualifier for finding the row to update
tableList - SQL table list
updateList - SQL update list
whereClause - SQL where clause
Returns:
a constructed SQL UPDATE statement
See Also:
EOSQLExpression.prepareUpdateExpressionWithRow(NSDictionary row, EOQualifier qualifier)

Last updated June 2008

Copyright © 2000-2008 Apple Inc.