|
WebObjects 5.2.4 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.eoaccess.EOSQLExpression
com.webobjects.jdbcadaptor.JDBCExpression
com.webobjects.jdbcadaptor.OpenBasePlugIn.OpenBaseExpression
Nested Class Summary |
Nested classes 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 | |
OpenBasePlugIn.OpenBaseExpression(EOEntity entity)
|
Method Summary | |
String |
assembleInsertStatementWithRow(NSDictionary row,
String tableList,
String columnList,
String valueList)
This method is invoked from prepareInsertExpressionWithRow to
return an SQL INSERT statement. |
String |
assembleJoinClause(String leftName,
String rightName,
int semantic)
This method is invoked from addJoinClause to return
a JOIN clause. |
String |
assembleSelectStatementWithAttributes(NSArray attributes,
boolean lock,
EOQualifier qualifier,
NSArray fetchOrder,
String selectString,
String columnList,
String tableList,
String whereClause,
String joinClause,
String orderByClause,
String lockClause)
This method is invoked from prepareSelectExpressionWithAttributes
to return an SQL SELECT statement. |
String |
assembleUpdateStatementWithRow(NSDictionary row,
EOQualifier qualifier,
String tableList,
String updateList,
String whereClause)
This method is invoked from prepareUpdateExpressionWithRow
to return an SQL UPDATE statement. |
NSMutableDictionary |
bindVariableDictionaryForAttribute(EOAttribute attribute,
Object value)
Implemented by subclasses to create and return the bind variable dictionary for attribute and value . |
void |
prepareInsertExpressionWithRow(NSDictionary row)
Generates an INSERT statement. |
void |
prepareUpdateExpressionWithRow(NSDictionary row,
EOQualifier qualifier)
Generates an UPDATE statement. |
char |
sqlEscapeChar()
Returns the char used for the ESCAPE clause in an SQL LIKE expression. |
String |
sqlStringForCaseInsensitiveLike(String valueString,
String keyString)
Overridden by subclasses to return a case insensitive comparison of valueString and keyString . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OpenBasePlugIn.OpenBaseExpression(EOEntity entity)
Method Detail |
public String assembleInsertStatementWithRow(NSDictionary row, String tableList, String columnList, String valueList)
EOSQLExpression
prepareInsertExpressionWithRow
to
return an SQL INSERT statement. The statement is of the form:
or, ifINSERT INTO tableList (columnList) VALUES valueList
columnList
is null
:
INSERT INTOtableList
VALUESvalueList
assembleInsertStatementWithRow
in class EOSQLExpression
row
- an NSDictionary containing the row datacolumnList
- SQL column listvalueList
- SQL value list
EOSQLExpression.prepareInsertExpressionWithRow(NSDictionary row)
public String assembleJoinClause(String leftName, String rightName, int semantic)
EOSQLExpression
addJoinClause
to return
a JOIN clause. The clause is of the form:
where operator is "=" for an inner join, "*=" for a left-outer join, and "=*" for a right-outer join.leftName operator rightName
assembleJoinClause
in class EOSQLExpression
leftName
- specifies leftname
rightName
- specifies rightname
semantic
- specifies semantic
EOSQLExpression.addJoinClause(String aString, String aString, int anInt)
public String assembleSelectStatementWithAttributes(NSArray attributes, boolean lock, EOQualifier qualifier, NSArray fetchOrder, String selectString, String columnList, String tableList, String whereClause, String joinClause, String orderByClause, String lockClause)
EOSQLExpression
prepareSelectExpressionWithAttributes
to return an SQL SELECT statement. The statment is of the form:
IfSELECT columnList FROM tableList lockClause WHERE whereClause AND joinClause ORDER BY orderByClause
lockClause
is null
, it is omitted from
the statement. Similarly, if orderByClause
is
null
, the "ORDER BY orderByClause" is omitted. If either
whereClause
or joinClause
is null
,
the "AND" and null
-valued argument are omitted. If both are
null
, the entire WHERE clause
is omitted. attributes, lock, qualifer, fetchOrder
arguments to
prepareSelectExpressionWithAttributes
from which the other
assembleSelect... arguments were derived. They are provided for subclasses
that need to generate the clauses of the SELECT statement in a
particular way.
assembleSelectStatementWithAttributes
in class EOSQLExpression
attributes
- an NSArray of attributeslock
- flag for locking rows in databasequalifier
- an EOQualifier for selecting rowsfetchOrder
- specifies fetch orderselectString
- SQL SELECT keyword, possibly with DISTINCTcolumnList
- SQL column listtableList
- SQL table listwhereClause
- SQL WHERE clausejoinClause
- specifies join condition to add to WHERE clauseorderByClause
- SQL ORDER BY clauselockClause
- specifies clause for lock
EOSQLExpression.prepareSelectExpressionWithAttributes(NSArray attributes, boolean lock, EOFetchSpecification fetchSpec)
public String assembleUpdateStatementWithRow(NSDictionary row, EOQualifier qualifier, String tableList, String updateList, String whereClause)
EOSQLExpression
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.
assembleUpdateStatementWithRow
in class EOSQLExpression
row
- an NSDictionary containing the row dataqualifier
- an EOQualifier for finding the row to updatetableList
- SQL table listupdateList
- SQL update listwhereClause
- SQL where clause
EOSQLExpression.prepareUpdateExpressionWithRow(NSDictionary row, EOQualifier qualifier)
public NSMutableDictionary bindVariableDictionaryForAttribute(EOAttribute attribute, Object value)
EOSQLExpression
attribute
and value
. The
dictionary returned from this method must contain
the following key-value pairs:
Key | Corresponding Value | |
---|---|---|
BindVariableNameKey | Name of the bind variable for attribute | |
BindVariablePlaceHolderKey | Placeholder string used in the SQL statement | |
BindVariableAttributeKey | attribute |
|
BindVariableValueKey | value |
An adaptor subclass may define additional entries as required by its RDBMS.
Invoked from sqlStringForValue
when the message
mustUseBindVariableForAttribute
returns true
or when the
receiver's class uses bind variables and the message
shouldUseBindVariableForAttribute
returns true
.
bindVariableDictionaryForAttribute
in class JDBCExpression
public void prepareInsertExpressionWithRow(NSDictionary row)
EOSQLExpression
addInsertListAttribute
for each entry in
row
to prepare the comma-separated list of attributes
and the corresponding list of values.tableListWithRootEntity
to get the table name.assembleInsertStatementWithRow
.
prepareInsertExpressionWithRow
in class EOSQLExpression
row
- specifies row which is to be insertedEOSQLExpression.addInsertListAttribute(EOAttribute anEOAttribute,
Object anObject)
,
EOSQLExpression.assembleInsertStatementWithRow(NSDictionary row
, String tableList, String columnList, String valueList)
,
EOSQLExpression.tableListWithRootEntity(EOEntity entity)
,
EOSQLExpressionFactory.insertStatementForRow(NSDictionary row, EOEntity entity)
public void prepareUpdateExpressionWithRow(NSDictionary row, EOQualifier qualifier)
EOSQLExpression
addUpdateListAttribute
for each entry in
row
to prepare the comma-separated list of
"attribute = value" assignments.whereClauseString
using
qualifer
.tableListWithRootEntity
to get the table
name for the FROM clause.assembleUpdateStatementWithRow
.
prepareUpdateExpressionWithRow
in class EOSQLExpression
row
- specifies row in which update will occurqualifier
- specifies qualifier which generates the
receiver's whereClauseString
EOSQLExpressionFactory.updateStatementForRow(
NSDictionary row, EOQualifier qualifier, EOEntity entity)
,
EOSQLExpression.addUpdateListAttribute(EOAttribute attribute,
Object value)
,
EOSQLExpression.whereClauseString()
,
EOSQLExpression.tableListWithRootEntity(EOEntity entity)
,
EOSQLExpression.lockClause()
,
EOSQLExpression.assembleUpdateStatementWithRow(NSDictionary row, EOQualifier qualifier, String tableList, String updateList, String whereClause)
public char sqlEscapeChar()
EOSQLExpression
sqlEscapeChar
in class EOSQLExpression
public String sqlStringForCaseInsensitiveLike(String valueString, String keyString)
EOSQLExpression
valueString
and keyString
. For example,
a subclass implementation might return the string
"UPPER(keyString
) LIKE UPPER(valueString
)".
sqlStringForCaseInsensitiveLike
in class EOSQLExpression
valueString
- specifies valueString
keyString
- specifies keyString
valueString
and
keyString
|
Last updated Wed May 25 10:47:15 PDT 2005. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |