|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.dataengine.AbstractContext
planetj.database.SQLContext
Contains information about an SQL command, including parameters on how to run the command, the command itself, and how to organize the command's results.
Field Summary | |
static int |
ALL_ROWS
|
static int |
CACHE_EXPIRATION_TIME_1_DAY
|
static int |
CACHE_EXPIRATION_TIME_1_HOUR
|
static int |
CACHE_EXPIRATION_TIME_1_WEEK
|
static int |
CACHE_EXPIRATION_TIME_15_MINUTES
|
static int |
CACHE_EXPIRATION_TIME_30_MINUTES
|
static int |
CACHE_EXPIRATION_TIME_NEVER
|
static int |
CACHING_CHECK
This SQLContext should check the cache instead of going to the DB if possible, but any results retrieved from the DB should not be stored in the cache |
static int |
CACHING_CHECK_AND_STORE
This SQLContext should check the cache instead of going to the DB if possible, and should store any data from the DB in the cache if possible. |
static int |
CACHING_NONE
This SQLContext should not use caching |
static int |
CACHING_STORE
This SQLContext should not check the cache, but if possible should store any data retrieved from the DB in the cache |
static java.lang.String |
className
|
static short |
LIBRARY_AS_SPECIFIED
This statment already has the libraries it is going against specified |
static short |
LIBRARY_SYSTEM
This statement is again the system library |
static short |
LIBRARY_UNKNOWN
It is not known if this statement is against the user or system library. |
static short |
LIBRARY_USER
This statement is against the user library |
Fields inherited from class planetj.dataengine.AbstractContext |
DEFAULT_TYPE, mCode, mLocked, mParameterized, mParameterNames, mParameterSource, mParameterValues, PARAM_ESCAPE_NUMBERED, PARAM_ESCAPE_TABLE, PARAM_ESCAPE_USAGE_ID, PARAM_ESCAPE_USER, PARAM_ESCAPE_USER_USAGE_ID, PARAM_NUMBERED, PARAM_TABLE, PARAM_USAGE_ID, PARAM_USER, PARAM_USER_USAGE_ID, TYPE_TABLE_PARAMETER |
Constructor Summary | |
SQLContext()
SQLContext constructor |
|
SQLContext(java.lang.String pSystemAlias)
SQLContext constructor |
|
SQLContext(java.lang.String pSystemAlias,
ExecutingContext ec)
SQLContext constructor |
|
SQLContext(java.lang.String pSystemAlias,
IUser user)
Deprecated. replaced with SQLContext(String, ExecutingContext) |
Method Summary | |
void |
addListener(IDataEngineListener listener)
Adds a listener to this SQLContext. |
void |
addTable(Table newTable)
Adds a table to this query. |
protected java.lang.StringBuffer |
appendProperties(java.lang.StringBuffer info)
Gets a String representation of this context. |
void |
clear()
Wipes out the info in this SQLContext, restoring the default values. |
void |
clearTables()
Clears the tables to this query. |
java.lang.Object |
clone()
Creates an unlocked copy of this SQLContext |
SQLContext |
cloneContext()
Creates an unlocked copy of this SQLContext |
SQLContext |
cloneContext(boolean clearExecutingContext)
Creates an unlocked copy of this SQLContext |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
execute()
Executes the SQL statement contained in this context and returns the results. |
java.lang.Object |
execute(boolean informOperation)
Executes the SQL statement contained in this context and returns the results. |
protected void |
finalize()
|
int |
getCachingLevel()
Gets the current caching level, describing whether the cache should be checked, and whether results should be stored in the cache. |
long |
getCachingTimeMillis()
Gets the amount of time in milliseconds this context's results are to be cached. |
java.sql.Connection |
getConnection()
Gets theCconnection that should be used for queries which use thix QuerContext. |
java.sql.Connection |
getConnection(boolean pCreate)
Gets the connection that should be used for DataEngine operations which use this SQLContext |
java.lang.String |
getConnectionAlias()
Deprecated. Just use getSystemAlias() instead |
java.lang.Object |
getConnectionOwner()
If the Connection contained in this object was created in this SQLContext, then this object is returned. |
int |
getExecutionRule()
Gets the execution rule for this context. |
int |
getFirstRowIndex()
Insert the method's description here. |
protected static int |
getHashcode(java.lang.Object o)
|
SQLContext |
getKeyContext()
Gets the SQLContext to be used as a key in the cache. |
protected java.util.List |
getListeners()
Gets the List of listeners. |
java.util.List |
getLogicalFieldNames()
Gets a List of the names of logical Fields in this SQLContext. |
java.lang.String |
getMetaDataAlias()
|
int |
getMode()
Gets a constant (such as Row.MODE_UPDATE or ROW.MODE_INSERT) describing the type of action this SQLContext is performing |
int |
getNumberOfTables()
Gets the number of tables being queried. |
protected java.lang.Class |
getParameterClass(java.lang.String parameterToken)
Returns the appropriate class for creating a parameter based on the parameter token. |
PropertyGroupList |
getPropertyGroups()
Get all the property groups stored in this RowCollection's attributes. |
protected java.lang.String |
getRectifiedCode()
Gets the rectified code which has already been passed through the rectifyCode() method but has not had any metadata library alteration performed on it yet |
ReportBreakCollection |
getReportBreakCollection()
Gets the ReportBreakCollection defining the reports that will be generated in the RowCollection resulting from queries which use this SQLContext |
int |
getReRunCount()
Get the number of times this context was attempted to run. |
java.lang.Class |
getRowClass()
Gets the type of Row objects that will be included in the
RowCollection resulting from the query. |
RowCollection |
getRowCollection()
Gets the RowCollection object into which retrieved rows will be inserted. |
java.lang.Class |
getRowCollectionClass()
Gets the type of RowCollection that will contain
this query's results. |
int |
getRowCount()
Gets the number of rows to add to the RowCollection. |
IRowCreator |
getRowCreator()
Gets the object used to create the Rows the query should return. |
java.lang.String |
getSafeSQL()
Returns this context's SQL, with all single quotes, double quotes, and backslashes replaced with underscores |
Row |
getSourceRow()
If this SQLContext is an update, insert, or delete statement which pertains to one specific row, then this method gets that row. |
java.lang.String |
getSQL()
Gets this SQLContext's SQL String. |
DeleteStatement |
getSQLDeleteStatement()
Get the context's current delete statement. |
InsertStatement |
getSQLInsertStatement()
Get the context's current insert statement. |
java.util.Iterator |
getSQLParameters()
Returns an iteration of all the ISQLParameters in this context. |
SelectStatement |
getSQLSelectStatement()
Get the context's current select statement. |
SQLStatement |
getSQLStatement()
Gets the SQL Statement object for this SQLContext |
UpdateStatement |
getSQLUpdateStatement()
Get the context's current update statement. |
java.lang.String |
getSystemAlias()
Gets the system alias for the SQL operation. |
Table |
getTable()
Gets the table which is being queried. |
Table |
getTable(int pTableIndex)
Gets the table being queried with the given index. |
TableCollection |
getTables()
Gets the tables being queried. |
long |
getTimestamp()
Gets when this SQLContext was last run |
java.lang.String |
getTitle()
Gets the title of this SQLContext, which will also be the title of any RowCollections retrieved via this SQLContext |
int |
getTotalRecords()
Get the total number or records possible from running SQL. |
int |
getTotalRecordsFromDB()
Runs a separate query against the DB to determine the total number of records which match the query in this context |
Row |
getUsageIdRow()
Gets the row whose data should be used to replace literal usage id's in the SQL (indicated with a ##?) |
short |
getUseWOWLibrary()
Tests which WOW library should be used to execute this context. |
int |
hashCode()
|
protected static int |
hashCode(java.util.List l)
Gets the hashCode of a List. |
boolean |
hasListeners()
Tests if there are any objects listening to this SQLContext. |
protected void |
initializeAndStore(IParameter param,
java.lang.String parameterToken)
Initializes and stores the parameter in this context |
boolean |
isAlterTableStatement()
Check if this context contains an alter table statement. |
boolean |
isAssociatedJoinOperationPresent()
Tests if the RC returned by this SQLContext has one or more columns whose FD's have an associated join operation |
boolean |
isAutoRefresh()
Tests if RowCollections retrieved with this SQLContext should automatically refresh themselves when the DataEngine is used to update the database. |
boolean |
isAutoStartWOWConnection()
Tests if WOW Connection retrieved with this SQLContext should automatically start itself when the DataEngine is used to run a WOW operation. |
boolean |
isBatch()
Tests if this SQLContext should be executed in batch mode |
boolean |
isCacheResults()
Tests if queries resulting from this SQLContext should be cached or not. |
boolean |
isCallStatement()
Tests if the SQL for this SQLContext begins with "CALL " |
boolean |
isCheckCache()
Tests if queries associated with this SQLContext should check the cache first, before going to the database. |
boolean |
isCheckFieldDataFileForFDs()
Return whether or not to check the Field data file when retrieving FieldDescriptors for newly created Fields in each Row. |
boolean |
isDeleteStatement()
Return whehter or not this context contains a delete statement. |
boolean |
isGroupByStatement()
Check to see if this context's sql contains a group by. |
boolean |
isInsertStatement()
Return whehter or not this context contains a select statement. |
boolean |
isMetaDataQuery()
Return whether or not this context is a special MetaData query |
protected boolean |
isParameterTokenEnd(char c)
Tests if the specified character signals the end of a parameter token |
protected boolean |
isQuery()
Deprecated. replaced with isRowCollectionContext |
boolean |
isReadTotalRecords()
Check whether or not to read the total number of records. |
boolean |
isResultSetRetained()
This tells whether or not the result set for this context should be retained for future accesses. |
boolean |
isRowCollectionContext()
Tests if executing this SQLContext will result in a RowCollection |
boolean |
isRunInBackground()
Tests if SQL commands using this context should run in a background thread. |
boolean |
isSelectStatement()
Return whether or not this context contains a select statement. |
boolean |
isSourceRowPresent()
Tests if this SQLContext contains a source row |
boolean |
isSystemAliasSpecified()
This tells whether or not the connection alias for this context is specified |
boolean |
isUnionStatement()
Check to see if this context's sql contains a union. |
protected boolean |
isUpdate()
Check to see if executeUpdate should be run on this context. |
boolean |
isUpdateStatement()
Return whehter or not this context contains an update statement. |
boolean |
isUsePreparedStatement()
Tests if statements run with this SQLContext should use prepared statements. |
protected boolean |
isVoid()
Check to see if execute should be run on this context. |
void |
loadParameterRequestAndSessionValues()
When this method is invoked, values are taken from request parameters, request attributes, and session attributes. |
protected static int |
nextShift(int currentShift)
|
void |
parameterAltered()
Callback method so that parameters can inform their context when they are alerted |
protected java.lang.String |
prepareForExecution()
This method is invoked just before the context's code is executed. |
protected java.lang.String |
rectifyCode(java.lang.String sql)
Converts the SQL statement to mostly uppercase, replaces most slashes with periods, "normalizes" the spacing, and handles its named parameters and logical Fields. |
protected static java.lang.String |
removeFieldDescriptorIds(java.lang.String sql)
Strips out the FD ID's from the sql |
void |
removeListener(IDataEngineListener listener)
Removes a listener from this SQLContext. |
void |
removeTable(Table pTable)
Adds a table to this query. |
void |
returnConnection()
Frees the connection, but only if this SQLContext orginally retrieved the connection. |
void |
setAssociatedJoinOperationPresent(boolean ajoin)
Sets if the RC returned by this SQLContext has one or more columns whose FD's have an associated join operation. |
SQLContext |
setAutoRefresh(boolean newAutoRefresh)
Sets if RowCollections retrieved with this SQLContext should automatically refresh themselves when the DataEngine is used to update the database. |
SQLContext |
setAutoStartWOWConnection(boolean newAutoStartWOWConnection)
Sets if WOW Connection retrieved with this SQLContext should automatically start itself when the DataEngine is used to run a WOW operation. |
void |
setBatch(boolean newBatch)
Sets if this SQLContext should be executed in batch mode |
SQLContext |
setCacheResults(boolean newResultsCached)
Sets whether or not results from a query based on this context should be cached. |
SQLContext |
setCachingLevel(int newCachingLevel)
Sets the current caching level, describing whether the cache should be checked, and whether results should be stored in the cache. |
SQLContext |
setCachingTimeMillis(long milliseconds)
Sets the time in milliseconds the results from executing this context are to be cached. |
SQLContext |
setCheckCache(boolean newCacheChecked)
Sets whether or not queries resulting from this SQLContext should check the cache first, or go directly to the database. |
SQLContext |
setCheckFieldDataFileForFDs(boolean pCheckFieldDataFileForFDs)
Sets whether or not to check the Field data file when retrieving FieldDescriptors for newly created Fields in each Row. |
void |
setCode(java.lang.String code)
Sets this context's code string. |
void |
setCode(java.lang.String code,
boolean shadowize)
Sets this context's code string. |
SQLContext |
setConnection(java.sql.Connection newConnection)
Sets the connection for this SQLContext. |
protected void |
setConnectionInternal(java.sql.Connection newConnection)
Sets the connection for this SQLContext. |
void |
setExecutionRule(int erule)
Sets the execution rule for this context. |
SQLContext |
setFirstRowIndex(int newFirstRow)
Insert the method's description here. |
protected SQLContext |
setKeyContext(SQLContext newKeyContext)
Sets the SQLContext to be used as a key in the cache. |
void |
setParameterValue(int position,
java.lang.Object value,
int dataType)
Provides a value to a parameter for this context's code string. |
void |
setReadTotalRecords(boolean readTotalRecords)
Set whether or not to read in the total number of records the SQL can return |
protected void |
setRectifiedCode(java.lang.String newRectifiedCode)
Sets the rectified code which has already been passed through the rectifyCode() method but has not had any metadata library alteration performed on it yet |
SQLContext |
setReportBreakCollection(PropertyGroupList pProperties)
Sets the ReportBreakCollection defining the reports that will be generated in the RowCollection resulting from queries which use this SQLContext |
SQLContext |
setReportBreakCollection(ReportBreakCollection newReportBreakCollection)
Sets the ReportBreakCollection defining the reports that will be generated in the RowCollection resulting from queries which use this SQLContext |
void |
setReRunCount(int reRunCount)
Set the number of times this context was attempted to run. |
SQLContext |
setResultSetRetained(boolean value)
Sets whether or not the result set for this context should be retained for future accesses. |
SQLContext |
setRowClass(java.lang.Class newRowClass)
Sets the type of Row objects that will be included in the
RowCollection resulting from the query. |
SQLContext |
setRowCollection(RowCollection newRowCollection)
Sets the RowCollection object into which retrieved rows will be inserted. |
SQLContext |
setRowCollectionClass(java.lang.Class newRowCollectionClass)
Sets the type of RowCollection that will contain
this query's results. |
SQLContext |
setRowCount(int rows)
Sets the number of rows to include in the RowCollection. |
SQLContext |
setRowCreator(IRowCreator newRowCreator)
Sets the object used to create the Rows the query should return. |
void |
setRowValues(Row source,
Row target)
Provides values for all of this context's named parameters. |
SQLContext |
setRunInBackground(boolean newRunInBackground)
Sets if SQL commands using this context should run in a background thread. |
void |
setSourceRow(Row newSourceRow)
If this SQLContext is an update, insert, or delete statement which pertains to one specific row, then this method sets that row |
SQLContext |
setSQL(java.lang.String newSQL)
Sets the sql statement for this query. |
SQLContext |
setSQL(java.lang.String newSQL,
boolean shadowize)
Sets the sql statement for this query. |
protected SQLContext |
setSQLInternal(java.lang.String newSQL)
Deprecated. This method has a misleading name (JE 8/5/2004) |
SQLContext |
setSystemAlias(java.lang.String pAlias)
Sets the system alias for the SQL operation. |
SQLContext |
setTables(java.util.List pTables)
Deprecated. Pass in a TableCollection instead |
SQLContext |
setTables(TableCollection pTables)
Sets the tables to this query. |
SQLContext |
setTitle(java.lang.String pTitle)
Sets the title of this SQLContext, which will also be the title of any RowCollections retrieved via this SQLContext |
void |
setTotalRecords(int records)
Sets the total number of records running the SQL can return |
void |
setUsageIdRow(Row row)
Sets the row whose data should be used to replace literal usage id's in the SQL (indicated with a ##?) |
SQLContext |
setUsePreparedStatement(boolean usePS)
Sets if statements run with this SQLContext should use prepared statements. |
void |
setUseWOWLibrary(short newWOWSystemLibrary)
Sets which WOW library should be used to execute this context. |
java.lang.String |
toString()
Gets a String representation of this context |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CACHING_NONE
public static final int CACHING_CHECK
public static final int CACHING_STORE
public static final int CACHING_CHECK_AND_STORE
public static final java.lang.String className
public static final int ALL_ROWS
public static final int CACHE_EXPIRATION_TIME_NEVER
public static final int CACHE_EXPIRATION_TIME_15_MINUTES
public static final int CACHE_EXPIRATION_TIME_30_MINUTES
public static final int CACHE_EXPIRATION_TIME_1_HOUR
public static final int CACHE_EXPIRATION_TIME_1_DAY
public static final int CACHE_EXPIRATION_TIME_1_WEEK
public static final short LIBRARY_SYSTEM
public static final short LIBRARY_USER
public static final short LIBRARY_UNKNOWN
public static final short LIBRARY_AS_SPECIFIED
Constructor Detail |
public SQLContext()
public SQLContext(java.lang.String pSystemAlias)
pSystemAlias
- The system alias for this SQLContextpublic SQLContext(java.lang.String pSystemAlias, IUser user)
pSystemAlias
- The system alias for this SQLContextpublic SQLContext(java.lang.String pSystemAlias, ExecutingContext ec)
pSystemAlias
- The system alias for this SQLContextMethod Detail |
public void addListener(IDataEngineListener listener)
background
. If the statement is not run
in the background, then the listeners are all informed of the result
before the DataEngine method which caused the statement to run returns.
public void addTable(Table newTable)
protected java.lang.StringBuffer appendProperties(java.lang.StringBuffer info)
appendProperties
in class AbstractContext
public void clear() throws DataEngineException
clear
in class AbstractContext
DataEngineException
public void clearTables()
public java.lang.Object clone()
clone
in interface INavigationObject
clone
in class AbstractContext
public SQLContext cloneContext()
public SQLContext cloneContext(boolean clearExecutingContext)
public boolean equals(java.lang.Object o)
public java.lang.Object execute() throws CMException
execute
in class AbstractContext
CMException
public java.lang.Object execute(boolean informOperation) throws CMException
CMException
protected void finalize() throws java.sql.SQLException
java.sql.SQLException
public int getCachingLevel()
public long getCachingTimeMillis()
public java.sql.Connection getConnection() throws DataEngineException
returnConnection()
method should be invoked
to free the connection. Do NOT invoke the
DataBaseManager.freeConnection() method directly, as the Connection may
have been set in this object in another section of code, with the
expectation that the Connection will still be useable.
DataEngineException
public java.sql.Connection getConnection(boolean pCreate) throws DataEngineException
pCreate
- If this is false and no connection exists, null is
returned. If this is true and no Connection has been set then
a new one is taken from the pool and returned. After the
caller is done using the Connection, the
returnConnection()
method should
be invoked to free the connection. Do NOT invoke the
DataBaseManager.freeConnection() method directly, as the
Connection may have been set in this object in another section
of code, with the expectation that the Connection will still
be useable.
DataEngineException
public java.lang.String getConnectionAlias()
public java.lang.Object getConnectionOwner()
public int getExecutionRule()
public int getFirstRowIndex()
protected static final int getHashcode(java.lang.Object o)
public SQLContext getKeyContext() throws DataEngineException
DataEngineException
protected java.util.List getListeners()
public java.util.List getLogicalFieldNames()
SELECT FNAME, LNAME, !!ORDERS FROM PLANETJ.CUSTOMERS
public java.lang.String getMetaDataAlias()
public int getMode()
public int getNumberOfTables()
protected java.lang.Class getParameterClass(java.lang.String parameterToken)
getParameterClass
in class AbstractContext
parameterToken
- The token such as "?", "??MY_COLUMN", or "???^22"
which indicates what type of parameter should be createdpublic PropertyGroupList getPropertyGroups()
getPropertyGroups
in interface IContext
getPropertyGroups
in class AbstractContext
protected java.lang.String getRectifiedCode()
public int getReRunCount()
public ReportBreakCollection getReportBreakCollection()
public java.lang.Class getRowClass()
Row
objects that will be included in the
RowCollection
resulting from the query. If the Row
type can't be determined until after the query has been run, set a
Row creator
instead of a Row class.
public RowCollection getRowCollection()
public java.lang.Class getRowCollectionClass()
RowCollection
that will contain
this query's results.
public int getRowCount()
public IRowCreator getRowCreator()
public java.lang.String getSafeSQL()
public Row getSourceRow()
public java.lang.String getSQL()
public DeleteStatement getSQLDeleteStatement()
public InsertStatement getSQLInsertStatement()
public java.util.Iterator getSQLParameters()
public SelectStatement getSQLSelectStatement()
public SQLStatement getSQLStatement()
public UpdateStatement getSQLUpdateStatement()
public java.lang.String getSystemAlias()
public Table getTable()
public Table getTable(int pTableIndex)
public TableCollection getTables()
public long getTimestamp()
public java.lang.String getTitle()
public int getTotalRecords()
public int getTotalRecordsFromDB() throws CMException
CMException
public Row getUsageIdRow()
public short getUseWOWLibrary()
public int hashCode()
protected static final int hashCode(java.util.List l)
public boolean hasListeners()
protected void initializeAndStore(IParameter param, java.lang.String parameterToken) throws CMException
initializeAndStore
in class AbstractContext
CMException
public boolean isAlterTableStatement()
public boolean isAssociatedJoinOperationPresent()
public boolean isAutoRefresh()
public boolean isAutoStartWOWConnection()
public boolean isBatch()
public boolean isCacheResults()
public boolean isCallStatement()
public boolean isCheckCache()
public boolean isCheckFieldDataFileForFDs()
public boolean isDeleteStatement()
public boolean isGroupByStatement()
public boolean isInsertStatement()
protected boolean isParameterTokenEnd(char c)
isParameterTokenEnd
in class AbstractContext
protected boolean isQuery()
public boolean isReadTotalRecords()
public boolean isResultSetRetained()
public boolean isRowCollectionContext()
public boolean isRunInBackground()
DataEngine.getRows()
methods will
return null immediately, and run the query in the background. Any of this
SQLContext's listeners will be informed when the query has completed.DataEngine.update()
methods
work in a similar fashion.
public boolean isSelectStatement()
public boolean isMetaDataQuery()
public boolean isSourceRowPresent()
public boolean isSystemAliasSpecified()
public boolean isUnionStatement()
protected boolean isUpdate()
public boolean isUpdateStatement()
public boolean isUsePreparedStatement()
protected boolean isVoid()
public void loadParameterRequestAndSessionValues() throws DataEngineException
loadParameterRequestAndSessionValues
in class AbstractContext
DataEngineException
protected static final int nextShift(int currentShift)
public void parameterAltered() throws DataEngineException
parameterAltered
in interface IContext
parameterAltered
in class AbstractContext
DataEngineException
protected java.lang.String prepareForExecution() throws DataEngineException
prepareForExecution
in class AbstractContext
DataEngineException
protected final java.lang.String rectifyCode(java.lang.String sql)
rectifyCode
in class AbstractContext
protected static java.lang.String removeFieldDescriptorIds(java.lang.String sql)
public void removeListener(IDataEngineListener listener)
public void removeTable(Table pTable)
public void returnConnection() throws DataEngineException
setConntection()
method was explicitly invoked, then it is the invoker's responsibility to
return the connection to the pool, and this method does nothing.
DataEngineException
public void setAssociatedJoinOperationPresent(boolean ajoin)
public SQLContext setAutoRefresh(boolean newAutoRefresh)
public SQLContext setAutoStartWOWConnection(boolean newAutoStartWOWConnection)
public void setBatch(boolean newBatch)
public SQLContext setCacheResults(boolean newResultsCached)
public SQLContext setCachingLevel(int newCachingLevel)
public SQLContext setCachingTimeMillis(long milliseconds)
public SQLContext setCheckCache(boolean newCacheChecked)
public SQLContext setCheckFieldDataFileForFDs(boolean pCheckFieldDataFileForFDs)
pCheckFieldDataFileForFDs
- boolean.public void setCode(java.lang.String code)
setCode
in class AbstractContext
public void setCode(java.lang.String code, boolean shadowize)
setCode
in class AbstractContext
public SQLContext setConnection(java.sql.Connection newConnection) throws DataEngineException
newConnection
- The connection object for this SQL context
Thrown
- if there is a problem converting the connection to a
DataEngineConnection. If you pass in a
DataEngineConnection, or null you don't have to worry
about an exception being thrown.
DataEngineException
protected void setConnectionInternal(java.sql.Connection newConnection)
public void setExecutionRule(int erule)
public SQLContext setFirstRowIndex(int newFirstRow)
newFirstRow
- intprotected SQLContext setKeyContext(SQLContext newKeyContext)
public final void setParameterValue(int position, java.lang.Object value, int dataType) throws CMException
position
- The index of the parameter whose value is being supplied.
The first parameter is 0, the second is 1, etc.value
- The value to give to the parameter. This value may be null.
After the value is passed to this method it must never
be changed. If it is possible for this value to change, you
should clone it and pass a clone which will not change to this
method.dataType
- The data type for the parameter whose value is being
supplied.
CMException
public void setReadTotalRecords(boolean readTotalRecords)
protected void setRectifiedCode(java.lang.String newRectifiedCode)
public SQLContext setReportBreakCollection(ReportBreakCollection newReportBreakCollection)
public SQLContext setReportBreakCollection(PropertyGroupList pProperties) throws DataEngineException
pProperties
- A PropertyGroupList containing properties which
specify a ReportBreakCollection
DataEngineException
public SQLContext setResultSetRetained(boolean value)
value
- boolean If true, the result set will be retained in the row
collection for future access. We will also turn all caching
for this context off. If false, the row collection will not be
retained.
public SQLContext setRowClass(java.lang.Class newRowClass)
Row
objects that will be included in the
RowCollection
resulting from the query. If the Row
type can't be determined until after the query has been run, set a
Row creator
instead of a Row class.
newRowClass
- The type of Row
objects that will be
returned in the result. This class must be a subclass of
planetj.database.Row
. Do not pass an abstract
class.public SQLContext setRowCollection(RowCollection newRowCollection)
public SQLContext setRowCollectionClass(java.lang.Class newRowCollectionClass)
RowCollection
that will contain
this query's results.
newRowCollectionClass
- The Class object for the collection of rows
in the query results. This class must be a subclass of the
RowCollection
class.public SQLContext setRowCount(int rows)
public SQLContext setRowCreator(IRowCreator newRowCreator)
public void setRowValues(Row source, Row target) throws CMException
CMException
public void setReRunCount(int reRunCount)
public SQLContext setRunInBackground(boolean newRunInBackground)
DataEngine.getRows()
methods will
return null immediately, and run the query in the background. Any
listeners
will be informed when the query has
completed.DataEngine.update()
methods
work in a similar fashion.
public void setSourceRow(Row newSourceRow)
public SQLContext setSQL(java.lang.String newSQL)
public SQLContext setSQL(java.lang.String newSQL, boolean shadowize)
protected SQLContext setSQLInternal(java.lang.String newSQL)
public SQLContext setSystemAlias(java.lang.String pAlias)
public SQLContext setTables(java.util.List pTables)
public SQLContext setTables(TableCollection pTables)
public SQLContext setTitle(java.lang.String pTitle)
public void setTotalRecords(int records)
public void setUsageIdRow(Row row)
public SQLContext setUsePreparedStatement(boolean usePS)
public void setUseWOWLibrary(short newWOWSystemLibrary)
public java.lang.String toString()
toString
in class AbstractContext
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |