com.webobjects.jdbcadaptor
Class OraclePlugIn.OracleExpression
java.lang.Object
|
+--com.webobjects.eoaccess.EOSQLExpression
|
+--com.webobjects.jdbcadaptor.JDBCExpression
|
+--com.webobjects.jdbcadaptor.OraclePlugIn.OracleExpression
- Enclosing class:
- OraclePlugIn
- public static class OraclePlugIn.OracleExpression
- extends JDBCExpression
Method Summary |
String |
assembleJoinClause(String leftName,
String rightName,
int semantic)
This method is invoked from addJoinClause to return
a JOIN clause. |
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. |
void |
prepareConstraintStatementForRelationship(EORelationship relationship,
NSArray sourceColumns,
NSArray destinationColumns)
Sets the receiver's statement to an adaptor specific
constraint for relationship. |
boolean |
shouldUseBindVariableForAttribute(EOAttribute att)
Returns true if the receiver can provide a bind variable
dictionary for attribute , false otherwise. |
String |
sqlStringForKeyValueQualifier(EOKeyValueQualifier qualifier)
Creates and returns a SQL string that is the result of interposing
an operator between the SQL strings for qualifier 's key
and value. |
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, assembleSelectStatementWithAttributes, bindVariableDictionaries, entity, formatSQLString, formatStringValue, joinClauseString, joinExpression, listString, orderByString, prepareDeleteExpressionForQualifier, prepareInsertExpressionWithRow, prepareUpdateExpressionWithRow, setStatement, setUseAliases, setUseBindVariables, setUseQuotedExternalNames, sqlEscapeChar, sqlPatternFromShellPattern, sqlPatternFromShellPatternWithEscapeCharacter, sqlStringForAttribute, sqlStringForAttributeNamed, sqlStringForAttributePath, sqlStringForCaseInsensitiveLike, sqlStringForConjoinedQualifiers, sqlStringForData, sqlStringForDisjoinedQualifiers, sqlStringForKeyComparisonQualifier, sqlStringForNegatedQualifier, sqlStringForNumber, sqlStringForQualifier, sqlStringForSchemaObjectName, sqlStringForSelector, sqlStringForString, sqlStringForValue, statement, tableListWithRootEntity, toString, useAliases, useQuotedExternalNames, valueList, whereClauseString |
OraclePlugIn.OracleExpression
public OraclePlugIn.OracleExpression(EOEntity entity)
assembleJoinClause
public String assembleJoinClause(String leftName,
String rightName,
int semantic)
- Description copied from class:
EOSQLExpression
- This method is invoked from
addJoinClause
to return
a JOIN clause. The clause is of the form:
leftName operator rightName
where operator is "=" for an inner join, "*=" for a left-outer join,
and "=*" for a right-outer join.
- Overrides:
assembleJoinClause
in class EOSQLExpression
- Following copied from class:
com.webobjects.eoaccess.EOSQLExpression
- Parameters:
leftName
- specifies leftname
rightName
- specifies rightname
semantic
- specifies semantic
- Returns:
- a constructed JOIN clause
- See Also:
EOSQLExpression.addJoinClause(String aString, String aString, int anInt)
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
- Following copied from class:
com.webobjects.eoaccess.EOSQLExpression
- Parameters:
row
- an NSDictionary containing the row dataqualifier
- an EOQualifier for finding the row to updatetableList
- SQL table listupdateList
- SQL update listwhereClause
- SQL where clause- Returns:
- a constructed SQL UPDATE statement
- See Also:
EOSQLExpression.prepareUpdateExpressionWithRow(NSDictionary row, EOQualifier qualifier)
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
- Following copied from class:
com.webobjects.eoaccess.EOSQLExpression
- Parameters:
value
- an object to be used in a SQL statementattribute
- an EOAttribute to be used in influencing the format- Returns:
- a formatted string
- See Also:
EOAttribute
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
- Following copied from class:
com.webobjects.jdbcadaptor.JDBCExpression
- Returns:
- always
true
for JDBC
prepareConstraintStatementForRelationship
public void prepareConstraintStatementForRelationship(EORelationship relationship,
NSArray sourceColumns,
NSArray destinationColumns)
- Description copied from class:
EOSQLExpression
- Sets the receiver's
statement
to an adaptor specific
constraint for relationship.
EOSQLExpression's implementation generates statements of the form:
ALTER TABLE TABLE_NAME ADD CONSTRAINT CONSTRAINT_NAME
FOREIGN KEY (SOURCE_KEY_LIST)
REFERENCES DESTINATION_TABLE_NAME (DESTINATION_KEY_LIST)
Where
TABLE_NAME
is the external name of the
receiver's entity.
CONSTRAINT_NAME
is the external name of
the receiver's entity, relationship's
name,
and the string "FK", concatenated with underbars between
them (EMPLOYEE_MANAGER_FK, for example),
SOURCE_KEY_LIST
is a comma-separated list of
the source columns in sourceColumns
.
DESTINATION_TABLE_NAME
is the external name of
relationship's
destination entity.
DESTINATION_KEY_LIST
is a comma-separated list of
the destination columns in destinationColumns
- Overrides:
prepareConstraintStatementForRelationship
in class EOSQLExpression
- Following copied from class:
com.webobjects.eoaccess.EOSQLExpression
- Parameters:
relationship
- specifies relationshipsourceColumns
- specifies array of source columnsdestinationColumns
- specifies destination columns- See Also:
EOSQLExpression.statement()
,
EOSchemaGeneration.foreignKeyConstraintStatementsForRelationship(EORelationship relationship)
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
- Following copied from class:
com.webobjects.jdbcadaptor.JDBCExpression
- Returns:
- always
true
for JDBC
sqlStringForKeyValueQualifier
public String sqlStringForKeyValueQualifier(EOKeyValueQualifier qualifier)
- Description copied from class:
EOSQLExpression
- Creates and returns a SQL string that is the result of interposing
an operator between the SQL strings for
qualifier
's key
and value. Determines the SQL operator by invoking
sqlStringForSelector
with qualifier's
selector
and value. Generates an SQL string for qualifier's
key
by invoking sqlStringForAttributeNamed
to get an SQL string and
formatSQLString
with the corresponding attribute's "read" format.
Similarly, generates an SQL string for qualifier's
value by
invoking sqlStringForValue
to get an SQL string and
formatValueForAttribute
to format it. (First invokes
sqlPatternFromShellPattern
for the value if
qualifier
's selector is
EOQualifier.QualifierOperatorLike
.)
- Overrides:
sqlStringForKeyValueQualifier
in class EOSQLExpression
- Following copied from class:
com.webobjects.eoaccess.EOSQLExpression
- Parameters:
qualifier
- specifies qualifier- Returns:
- a SQL string that is the result of
interposing an operator between the SQL strings
for
qualifier's
key and value - See Also:
EOSQLExpression.sqlStringForSelector(NSSelector aNSSelector, Object anObject)
,
EOSQLExpression.sqlStringForAttributeNamed(String name)
,
EOSQLExpression.formatSQLString(String sqlString, String format)
,
EOSQLExpression.sqlStringForValue(Object value, String keyPath)
,
EOSQLExpression.formatValueForAttribute(Object value, EOAttribute attribute)
,
EOSQLExpression.sqlPatternFromShellPattern(String pattern)
Copyright © 2003 Apple Computer, Inc.