|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.server.OLiteSQLBuilderImpl
OracleLite-specific implementation of the SQLBuilder interface.
Field Summary | |
static int |
ERROR_OLITE_RESOURCE_BUSY_AND_NOWAIT_SPECIFIED
|
protected static java.lang.String |
ORACLE_ROWID_COLUMN
|
Fields inherited from interface oracle.jbo.server.SQLBuilder |
BINDING_STYLE_JDBC,
BINDING_STYLE_ORACLE,
BINDING_STYLE_UNKNOWN,
DML_DELETE,
DML_INSERT,
DML_UPDATE |
Constructor Summary | |
protected |
OLiteSQLBuilderImpl()
This is a singleton class |
Method Summary | |
protected static java.lang.String |
addSqlTypeText(java.lang.String sqlText,
java.lang.String inputType)
helper for getTableList |
protected java.lang.StringBuffer |
buildDeleteStatement(EntityImpl entityContext,
java.lang.String sinkName,
java.lang.String sinkAlias,
AttributeDefImpl[] keyCols)
Construct a SQL INSERT statement |
protected java.lang.StringBuffer |
buildInsertStatement(EntityImpl entityContext,
java.lang.String sinkName,
AttributeDefImpl[] cols,
AttributeDefImpl[] keyCols,
AttributeDefImpl[] retrCols,
AttributeDefImpl[] retrKeyCols)
Construct a SQL INSERT statement |
protected void |
buildSelectString(java.lang.StringBuffer buffer,
java.lang.String sourceName,
AttributeDefImpl[] attrs,
boolean withIntoClause)
Construct a SQL SELECT statement for the Entity into the designated Buffer. |
protected java.lang.StringBuffer |
buildUpdateStatement(EntityImpl entityContext,
java.lang.String sinkName,
AttributeDefImpl[] cols,
AttributeDefImpl[] keyCols,
AttributeDefImpl[] retrCols,
AttributeDefImpl[] retrKeyCols)
DOCTD: Method declaration TODO: KM _ don't like the fact that this requires an entitydef |
protected void |
buildWhereClause(EntityImpl entityContext,
java.lang.StringBuffer buffer,
AttributeDefImpl[] keyCols,
java.lang.Object rowid)
Construct a SQL WHERE clause for the Entity into the designated Buffer, based upon the Source Columns. |
void |
doEntityDML(EntityImpl entityContext,
int operation,
TransactionEvent e)
Performs the appropriate SQL Data Manipulation Language (DML) operations on the database to reflect an update, delete or insert operation on an Entity Object. |
void |
doEntitySelect(EntityImpl entityContext,
boolean lock)
Perform the appropriate SQL operations to execute a select operation on an Entity Object. |
java.lang.Object[] |
doLoadBulkFromResultSet(AttributeDefImpl[] attrDefs,
int attrIndex,
java.sql.ResultSet rs,
int index,
DBTransactionImpl trans)
Loads an array of objects from a result set. |
java.lang.Object |
doLoadFromResultSet(java.lang.Object theTypeFactory,
java.lang.Object theElemFactory,
java.lang.Class theJavaType,
byte attrLoad,
java.sql.ResultSet rs,
int index,
DBTransactionImpl trans)
Loads an object from a result set. |
java.lang.Object |
doLoadFromStatement(java.lang.Object theTypeFactory,
java.lang.Object theElemFactory,
java.lang.Class theJavaType,
java.sql.PreparedStatement ps,
int index,
Transaction trans)
Loads an object from a result set. |
void |
doPreparedStatementDefineColumnType(java.sql.PreparedStatement ps,
int colnum,
int sqltype)
Performs the equivalent of defineColumnType() on a prepared statement. |
void |
doPreparedStatementDefines(java.sql.PreparedStatement ps,
AttributeDefImpl[] attrs)
Performs the equivalent of clearDefines() on a prepared statement. |
void |
doRegisterDefaultDriver()
Registers the JDBC driver associated with this type of JDBC connection. |
void |
doStatementSetBindingStyle(java.sql.Statement ps,
int bindingStyle)
Sets the binding style for the statement. |
void |
doStatementSetBindingStyleDefault(java.sql.Statement ps)
|
void |
doStatementSetRowPrefetch(java.sql.Statement ps,
int prefetchSize)
Performs the equivalent of setRowPrefetch() on a statement. |
java.lang.Object |
generatePKBasedRef(EntityImpl entityContext)
Generates a PK-Based REF for an Entity Object. |
java.lang.Object[] |
generateRefAndOID(EntityImpl entityContext)
Generates an object Ref and OID for an Entity Object. |
java.lang.Object |
generateRowID(EntityImpl entityContext)
Generates a ROWID for an Entity Object. |
java.lang.String |
getBaseTable(java.sql.Connection conn,
java.lang.String schema,
java.lang.String name)
unroll any synonyms that may be present, and get the real objectname |
java.sql.ResultSet |
getConstraints(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
return a resultset with constarint details: TODO: for 4.0 reshape this call - which is listed verbatim from jbo.dt.utils.JboDBUtil |
java.lang.String |
getDbType()
returns a string uniquely identifying this type of SQLBuilder. |
int |
getDefaultBindingStyle()
returns a constant identifying the best binding style for this sort of SQL (see the BINDINGSTYLE constants) |
static SQLBuilder |
getInterface()
Gets the singleton instance of this class. |
java.util.Vector |
getTableList(java.sql.Connection conn,
java.lang.String defaultUserName,
java.lang.String userName,
boolean bTable,
boolean bAlias,
boolean bView,
boolean bSnap)
return a list of tables visible in this connection |
protected static java.lang.String |
getTableListSqlStatement(java.lang.String _defaultUserName,
java.lang.String userName,
boolean bTable,
boolean bAlias,
boolean bView,
boolean _bSnap,
boolean bCount)
helper for getTableList |
java.lang.String |
getVersion()
Gets a string describing the version of this implentation of this interface. |
boolean |
isNumericType(int type)
Tests if a type is numeric. |
boolean |
isStreamType(int sqlTypeId)
Provides streaming support. |
void |
populateJboTypeMapEntries()
Populates the system typemap table with entries appropriate for the JDBC implementation. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int ERROR_OLITE_RESOURCE_BUSY_AND_NOWAIT_SPECIFIED
protected static final java.lang.String ORACLE_ROWID_COLUMN
Constructor Detail |
protected OLiteSQLBuilderImpl()
Method Detail |
public static SQLBuilder getInterface()
public java.lang.String getVersion()
public java.lang.String getDbType()
public int getDefaultBindingStyle()
public void doEntityDML(EntityImpl entityContext, int operation, TransactionEvent e)
Note: this method is subject to change.
enrt
- the Entity Object.operation
- one of DML_INSERT, DML_UPDATE, or DML_DELETE.e
- the transaction.public void doEntitySelect(EntityImpl entityContext, boolean lock)
Note: this method is subject to change.
enrt
- the Entity Object.lock
- if true, a "SELECT for UPDATE" statement is used.public java.lang.Object generateRowID(EntityImpl entityContext)
public void doStatementSetRowPrefetch(java.sql.Statement ps, int prefetchSize) throws java.sql.SQLException
public void doStatementSetBindingStyle(java.sql.Statement ps, int bindingStyle)
public void doStatementSetBindingStyleDefault(java.sql.Statement ps)
public void doPreparedStatementDefineColumnType(java.sql.PreparedStatement ps, int colnum, int sqltype) throws java.sql.SQLException
public void doPreparedStatementDefines(java.sql.PreparedStatement ps, AttributeDefImpl[] attrs)
public void doRegisterDefaultDriver() throws java.sql.SQLException
public void populateJboTypeMapEntries()
public boolean isNumericType(int type)
public java.lang.Object doLoadFromResultSet(java.lang.Object theTypeFactory, java.lang.Object theElemFactory, java.lang.Class theJavaType, byte attrLoad, java.sql.ResultSet rs, int index, DBTransactionImpl trans)
Note: this method is subject to change.
theTypeFactory
- a custom factory to be used for constructing new instances.index
- the index of the object to be loaded.public java.lang.Object[] doLoadBulkFromResultSet(AttributeDefImpl[] attrDefs, int attrIndex, java.sql.ResultSet rs, int index, DBTransactionImpl trans)
Note: this method is subject to change.
index
- the index of the object to be loaded.public java.lang.Object doLoadFromStatement(java.lang.Object theTypeFactory, java.lang.Object theElemFactory, java.lang.Class theJavaType, java.sql.PreparedStatement ps, int index, Transaction trans)
Note: this method is subject to change.
theTypeFactory
- a custom factory to be used for constructing new instances.index
- the index of the object to be loaded.protected java.lang.StringBuffer buildUpdateStatement(EntityImpl entityContext, java.lang.String sinkName, AttributeDefImpl[] cols, AttributeDefImpl[] keyCols, AttributeDefImpl[] retrCols, AttributeDefImpl[] retrKeyCols)
sinkName
- cols
- keyCols
- retrCols
- retrKeyCols
- protected void buildWhereClause(EntityImpl entityContext, java.lang.StringBuffer buffer, AttributeDefImpl[] keyCols, java.lang.Object rowid)
For now it's private. We'll only consider it public when we sort out all of the issues with Sources/Sinks.
The presence or absence of the ROWID value determines whether the ROWID will be used for Row access.
buffer
- the area into which the WHERE Clause will be placed.keyCols
- the Primary key columns.rowid
- the ROWID for the ROW if known.protected java.lang.StringBuffer buildInsertStatement(EntityImpl entityContext, java.lang.String sinkName, AttributeDefImpl[] cols, AttributeDefImpl[] keyCols, AttributeDefImpl[] retrCols, AttributeDefImpl[] retrKeyCols)
- protected java.lang.StringBuffer buildDeleteStatement(EntityImpl entityContext, java.lang.String sinkName, java.lang.String sinkAlias, AttributeDefImpl[] keyCols)
- protected void buildSelectString(java.lang.StringBuffer buffer, java.lang.String sourceName, AttributeDefImpl[] attrs, boolean withIntoClause)
buffer
- the area into which the SELECT statement will be placed.public java.lang.Object generatePKBasedRef(EntityImpl entityContext)
public java.lang.Object[] generateRefAndOID(EntityImpl entityContext)
public boolean isStreamType(int sqlTypeId)
public java.util.Vector getTableList(java.sql.Connection conn, java.lang.String defaultUserName, java.lang.String userName, boolean bTable, boolean bAlias, boolean bView, boolean bSnap) throws java.lang.Exception
protected static java.lang.String getTableListSqlStatement(java.lang.String _defaultUserName, java.lang.String userName, boolean bTable, boolean bAlias, boolean bView, boolean _bSnap, boolean bCount)
protected static java.lang.String addSqlTypeText(java.lang.String sqlText, java.lang.String inputType)
public java.sql.ResultSet getConstraints(java.sql.Connection conn, java.lang.String catalog, java.lang.String schema, java.lang.String table) throws java.sql.SQLException
public java.lang.String getBaseTable(java.sql.Connection conn, java.lang.String schema, java.lang.String name) throws java.sql.SQLException
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |