Purpose: Concrete class to perform read using raw SQL and the SQLResultSetMapping.
Responsibilities: Execute a selecting raw SQL string. Returns a List of results. Each item in the list will be another list consisting of the expected populated return types in the order they were specified in the SQLResultSetMapping
SQLResultSetMapping
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| protected Vector | |
| protected List | |
| protected List | |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | ResultSetMappingQuery(Call call, String sqlResultSetMappingName)
PUBLIC: Initialize the query to use the specified call and SQLResultSetMapping |
| Modifier and Type | Method and Description |
|---|---|
| public void | addSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results |
| public void | addSQLResultSetMappingName(String name)
PUBLIC: Add a SQLResultSetMapping that is used by this query to process the database results. |
| public List | |
| public List | buildObjectsFromRecords(List<E> databaseRecords, int index)
INTERNAL: This method is used to build the results with the SQLResultSetMapping at the given index. |
| protected List | buildObjectsFromRecords(List<E> databaseRecords, SQLResultSetMapping mapping)
INTERNAL: This method is used to build the results. |
| public void | cacheResult(Object unwrappedOriginal)
Implements abstract org. This method is called by the object builder when building an original. |
| public void | convertClassNamesToClasses(ClassLoader classLoader)
Overrides org. |
| public Object | executeDatabaseQuery()
Implements abstract org. |
| public SQLResultSetMapping | getSQLResultSetMapping()
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results |
| public String | |
| public List | |
| public List | getSQLResultSetMappings()
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results |
| public boolean | hasResultSetMappings()
PUBLIC: Return true if there are results set mappings associated with this query. |
| public boolean | isResultSetMappingQuery()
Overrides org. |
| protected void | prepare()
Overrides org. |
| public void | setIsExecuteCall(boolean isExecuteCall)
PUBLIC: Set to true if you the actual jdbc result set returned from query execution. |
| public void | setShouldReturnNameValuePairs(boolean returnNameValuePairs)
Set the flag that indicates whether or not to return populated DatabaseRecord(s) as opposed to raw data when an SQLResultSetMapping is not set. |
| public void | setSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results |
| public void | setSQLResultSetMappingName(String name)
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results |
| public void | |
| public void | setSQLResultSetMappings(List<SQLResultSetMapping> resultSetMappings)
PUBLIC: This will be the SQLResultSetMappings that are used by this query to process the database results |
| public boolean | shouldReturnNameValuePairs()
Indicates whether or not to return populated DatabaseRecord(s) as opposed to raw data when an SQLResultSetMapping is not set. |
| isExecuteCall | back to summary |
|---|---|
| protected boolean isExecuteCall | |
| resultRows | back to summary |
|---|---|
| protected Vector<E> resultRows | |
| resultSetMappingNames | back to summary |
|---|---|
| protected List<String> resultSetMappingNames | |
| resultSetMappings | back to summary |
|---|---|
| protected List<SQLResultSetMapping> resultSetMappings | |
| returnNameValuePairs | back to summary |
|---|---|
| protected boolean returnNameValuePairs | |
| ResultSetMappingQuery | back to summary |
|---|---|
| public ResultSetMappingQuery() PUBLIC: Initialize the state of the query. | |
| ResultSetMappingQuery | back to summary |
|---|---|
| public ResultSetMappingQuery(Call call) PUBLIC: Initialize the query to use the specified call. | |
| ResultSetMappingQuery | back to summary |
|---|---|
| public ResultSetMappingQuery(Call call, String sqlResultSetMappingName) PUBLIC: Initialize the query to use the specified call and SQLResultSetMapping | |
| addSQLResultSetMapping | back to summary |
|---|---|
| public void addSQLResultSetMapping(SQLResultSetMapping resultSetMapping) PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results | |
| addSQLResultSetMappingName | back to summary |
|---|---|
| public void addSQLResultSetMappingName(String name) PUBLIC: Add a SQLResultSetMapping that is used by this query to process the database results. | |
| buildObjectsFromRecords | back to summary |
|---|---|
| public List INTERNAL: This method is used to build the results. Interpreting the SQLResultSetMapping(s). | |
| buildObjectsFromRecords | back to summary |
|---|---|
| public List INTERNAL: This method is used to build the results with the SQLResultSetMapping at the given index. | |
| buildObjectsFromRecords | back to summary |
|---|---|
| protected List INTERNAL: This method is used to build the results. Interpreting the SQLResultSetMapping. | |
| cacheResult | back to summary |
|---|---|
| public void cacheResult(Object unwrappedOriginal) Implements abstract org. INTERNAL: This method is called by the object builder when building an original. It will cause the original to be cached in the query results if the query is set to do so.
| |
| convertClassNamesToClasses | back to summary |
|---|---|
| public void convertClassNamesToClasses(ClassLoader classLoader) Overrides org. INTERNAL: Convert all the class-name-based settings in this ResultSetMapping to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.
| |
| executeDatabaseQuery | back to summary |
|---|---|
| public Object executeDatabaseQuery() throws DatabaseException Implements abstract org. INTERNAL: Executes the prepared query on the datastore.
| |
| getSQLResultSetMapping | back to summary |
|---|---|
| public SQLResultSetMapping getSQLResultSetMapping() PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results | |
| getSQLResultSetMappingName | back to summary |
|---|---|
| public String getSQLResultSetMappingName() PUBLIC: Return the result set mapping name. | |
| getSQLResultSetMappingNames | back to summary |
|---|---|
| public List PUBLIC: Return the result set mapping name. | |
| getSQLResultSetMappings | back to summary |
|---|---|
| public List PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results | |
| hasResultSetMappings | back to summary |
|---|---|
| public boolean hasResultSetMappings() PUBLIC: Return true if there are results set mappings associated with this query. | |
| isResultSetMappingQuery | back to summary |
|---|---|
| public boolean isResultSetMappingQuery() Overrides org. PUBLIC: Return true if this is a result set mapping query.
| |
| prepare | back to summary |
|---|---|
| protected void prepare() Overrides org. INTERNAL: Prepare the receiver for execution in a session.
| |
| setIsExecuteCall | back to summary |
|---|---|
| public void setIsExecuteCall(boolean isExecuteCall) PUBLIC: Set to true if you the actual jdbc result set returned from query execution. This will unprepare the query in case it was executed previously for a getResultList() call instead (or vice versa) | |
| setShouldReturnNameValuePairs | back to summary |
|---|---|
| public void setShouldReturnNameValuePairs(boolean returnNameValuePairs) Set the flag that indicates whether or not to return populated DatabaseRecord(s) as opposed to raw data when an SQLResultSetMapping is not set. | |
| setSQLResultSetMapping | back to summary |
|---|---|
| public void setSQLResultSetMapping(SQLResultSetMapping resultSetMapping) PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results | |
| setSQLResultSetMappingName | back to summary |
|---|---|
| public void setSQLResultSetMappingName(String name) PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results | |
| setSQLResultSetMappingNames | back to summary |
|---|---|
| public void setSQLResultSetMappingNames(List<String> names) PUBLIC: This will be the SQLResult | |
| setSQLResultSetMappings | back to summary |
|---|---|
| public void setSQLResultSetMappings(List<SQLResultSetMapping> resultSetMappings) PUBLIC: This will be the SQLResultSetMappings that are used by this query to process the database results | |
| shouldReturnNameValuePairs | back to summary |
|---|---|
| public boolean shouldReturnNameValuePairs() Indicates whether or not to return populated DatabaseRecord(s) as opposed to raw data when an SQLResultSetMapping is not set. | |