EROracleExpression Class Reference

Inherits com::webobjects::jdbcadaptor::OraclePlugIn::OracleExpression.

Collaboration diagram for EROracleExpression:

Collaboration graph
[legend]

List of all members.

Classes

interface  Delegate

Public Member Functions

void addCreateClauseForAttribute (EOAttribute attribute)
void addOrderByAttributeOrdering (EOSortOrdering sortOrdering)
String assembleSelectStatementWithAttributes (NSArray attributes, boolean lock, EOQualifier qualifier, NSArray fetchOrder, String selectString, String columnList, String tableList, String whereClause, String joinClause, String orderByClause, String lockClause)
NSMutableDictionary bindVariableDictionaryForAttribute (EOAttribute eoattribute, Object obj)
 EROracleExpression (EOEntity eoentity)
String formatValueForAttribute (Object obj, EOAttribute eoattribute)
boolean mustUseBindVariableForAttribute (EOAttribute attribute)
void prepareConstraintStatementForRelationship (EORelationship relationship, NSArray sourceColumns, NSArray destinationColumns)
boolean shouldUseBindVariableForAttribute (EOAttribute attribute)
boolean useBindVariables ()

Static Public Member Functions

static void setDelegate (EROracleExpression.Delegate delegate)

Protected Member Functions

boolean shouldAllowNull (EOAttribute attribute)

Private Member Functions

boolean isTimestampAttribute (EOAttribute eoattribute)

Private Attributes

final NSMutableArray _alreadyJoined = new NSMutableArray()
int _fetchLimit

Static Private Attributes

static EROracleExpression.Delegate _delegate
static final NSTimestampFormatter _TIMESTAMP_FORMATTER = new NSTimestampFormatter("%Y-%m-%d %H:%M:%S.%F")


Detailed Description

overrides OracleExpression in order to add TIMESTAMP values including milliseconds. The normal EOF Oracle PlugIn does not add milliseconds to the TIMESTAMP value

Author:
David Teran

Constructor & Destructor Documentation

EROracleExpression ( EOEntity  eoentity  ) 


Member Function Documentation

void addCreateClauseForAttribute ( EOAttribute  attribute  ) 

void addOrderByAttributeOrdering ( EOSortOrdering  sortOrdering  ) 

Overridden to allow the Null Sorting behavior of Oracle to be modified by setting an application property. There are three options:

1) Nulls always first, irrespective of sorting: EROraclePlugIn.nullSortBehavior=NullsFirst

2) Nulls always last, irrespective of sorting (this is Oracle's default): EROraclePlugIn.nullSortBehavior=NullsLast

3) Nulls as the least or smallest value, the same as EOF: EROraclePlugIn.nullSortBehavior=EOFStyle.

If you want to use either NullsFirst or NullsLast, you will need to create a new EOSortOrdering.ComparisonSupport class and set it to be used at application startup otherwise EOF will still go and resort using nulls as the smallest value.

See also:
com.webobjects.eoaccess.EOSQLExpression.addOrderByAttributeOrdering(com.webobjects.eocontrol.EOSortOrdering)

String assembleSelectStatementWithAttributes ( NSArray  attributes,
boolean  lock,
EOQualifier  qualifier,
NSArray  fetchOrder,
String  selectString,
String  columnList,
String  tableList,
String  whereClause,
String  joinClause,
String  orderByClause,
String  lockClause 
)

Overriden to handle correct placements of join conditions and to handle DISTINCT fetches with compareCaseInsensitiveA(De)scending sort orders. Lifted directly from the PostgressExpression.java class.

Parameters:
attributes the attributes to select
lock flag for locking rows in the database
qualifier the qualifier to restrict the selection
fetchOrder specifies the fetch order
columnList the SQL columns to be fetched
tableList the the SQL tables to be fetched
whereClause the SQL where clause
joinClause the SQL join clause
orderByClause the SQL sort order clause
lockClause the SQL lock clause
Returns:
the select statement

NSMutableDictionary bindVariableDictionaryForAttribute ( EOAttribute  eoattribute,
Object  obj 
)

Overridden in order to add milliseconds to the value. This applies only if obj is an instance of NSTimestamp and if valueType from the eoattribute is T

Parameters:
obj 
eoattribute 
Returns:
the modified bindVariableDictionary

String formatValueForAttribute ( Object  obj,
EOAttribute  eoattribute 
)

Overridden in order to add milliseconds to the value. This applies only if obj is an instance of NSTimestamp and if valueType from the eoattribute is T

Parameters:
obj 
eoattribute 
Returns:
the modified string

boolean isTimestampAttribute ( EOAttribute  eoattribute  )  [private]

boolean mustUseBindVariableForAttribute ( EOAttribute  attribute  ) 

Returns:
true to indicate that the Oracle jdbc driver should use bind variables

void prepareConstraintStatementForRelationship ( EORelationship  relationship,
NSArray  sourceColumns,
NSArray  destinationColumns 
)

static void setDelegate ( EROracleExpression.Delegate  delegate  )  [static]

Sets the delegate for this expression.

Parameters:
delegate the delegate for this expression

boolean shouldAllowNull ( EOAttribute  attribute  )  [protected]

boolean shouldUseBindVariableForAttribute ( EOAttribute  attribute  ) 

Returns:
true to indicate that the Oracle jdbc driver should use bind variables

boolean useBindVariables (  ) 

Returns:
true to indicate that the Oracle jdbc driver should use bind variables


Member Data Documentation

final NSMutableArray _alreadyJoined = new NSMutableArray() [private]

Holds array of join clauses.

EROracleExpression.Delegate _delegate [static, private]

int _fetchLimit [private]

Fetch spec limit ivar

final NSTimestampFormatter _TIMESTAMP_FORMATTER = new NSTimestampFormatter("%Y-%m-%d %H:%M:%S.%F") [static, private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:33 2012 for Project Wonder by  doxygen 1.5.8