com.moximedia.aims
Class SqlReport

java.lang.Object
  extended bycom.moximedia.aims.SqlReport
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SqlReport
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

The SqlReport class is used to link external SQL data to features in a spatial layer (AimsFeatureLayer) so that data from the external SQL table appear in identify and select reports for that layer. There can be multiple SqlReport objects attached to a layer. The results returned by the query are held in a simple recordset array within this object.

Author:
Doug Cates
See Also:
Serialized Form

Constructor Summary
SqlReport()
          Creates a new instance of SqlReport
 
Method Summary
 void addChildReport(SqlReport report)
           
 void addParameter(SqlParameter param)
          Adds a parameter to the SqlReport.
 void clear()
          Removes the records from this object, and any sub-objects.
 java.lang.Object clone()
           
 void executeQuery(SqlConnections connections)
           
 void executeQuery(SqlConnections connections, SqlRecord parentRecord)
          Executes the query statement to populate the result array.
 java.util.ArrayList getChildReports()
           
 SqlReport getCopy()
           
 java.lang.String getDescription()
          Gets the description of the SqlReport, which appears as a title on the identify and select reports.
 java.lang.String getDescription(SqlRecord record)
          Gets the description of the SqlReport, which appears as a title on the identify and select reports.
 boolean getMaximumResultsExceeded()
          Returns an indicator of whether the maximum number of results has been exceeded.
 int getObjectId()
          Returns the IMF internal object id for this object, guaranteed to be different from any other oobject of this type in the currently running application.
 int getReportLevel()
           
 SqlRecordset getSqlRecordset()
           
 java.lang.String getSqlStatement(SqlRecord parentRecord)
          Gets the SQL statement after replacing parameters.
 boolean hasDatabaseParameters()
           
 boolean hasFatParameters()
           
 boolean isTopLevelReport()
           
 void setDescription(java.lang.String description)
          Sets the name of the SqlReport, which appears as a title on the identify and select reports.
 void setRecordset(AimsRecordset rs)
          Sets the feature layer recordset for use in retrieving values contained in the feature attributes.
 void setSql(java.lang.String sql)
          Sets the SQL prepared statement for the query, which may contain placeholders for the parameters indicated by "?" characters.
 void setXmlAttribute(java.lang.String tag, java.lang.String name, java.lang.String value)
          Sets one of the attributes of this object using a string value.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlReport

public SqlReport()
Creates a new instance of SqlReport

Method Detail

clone

public java.lang.Object clone()

getCopy

public SqlReport getCopy()

getObjectId

public int getObjectId()
Returns the IMF internal object id for this object, guaranteed to be different from any other oobject of this type in the currently running application.

Returns:
The internal id for this object.

isTopLevelReport

public boolean isTopLevelReport()

getReportLevel

public int getReportLevel()

addParameter

public void addParameter(SqlParameter param)
Adds a parameter to the SqlReport. The parameter object references the field name in the feature layer's recordset, so that it's data can be substituted into the SQL query to retrieve external data.

Parameters:
param - The SqlParameter object.

addChildReport

public void addChildReport(SqlReport report)

getChildReports

public java.util.ArrayList getChildReports()

clear

public void clear()
Removes the records from this object, and any sub-objects.


getMaximumResultsExceeded

public boolean getMaximumResultsExceeded()
Returns an indicator of whether the maximum number of results has been exceeded.

Returns:
True if the maximum number of results has been exceeded, otherwise false.

getDescription

public java.lang.String getDescription()
Gets the description of the SqlReport, which appears as a title on the identify and select reports.

Returns:
The description for the report.

getDescription

public java.lang.String getDescription(SqlRecord record)
Gets the description of the SqlReport, which appears as a title on the identify and select reports.

Returns:
The description for the report.

setDescription

public void setDescription(java.lang.String description)
Sets the name of the SqlReport, which appears as a title on the identify and select reports.


executeQuery

public void executeQuery(SqlConnections connections)

executeQuery

public void executeQuery(SqlConnections connections,
                         SqlRecord parentRecord)
Executes the query statement to populate the result array.

Parameters:
connections - The available named connections.

setRecordset

public void setRecordset(AimsRecordset rs)
Sets the feature layer recordset for use in retrieving values contained in the feature attributes.

Parameters:
rs - The layer's recordset object.

setSql

public void setSql(java.lang.String sql)
Sets the SQL prepared statement for the query, which may contain placeholders for the parameters indicated by "?" characters.

Parameters:
sql - The SQL statement.

getSqlStatement

public java.lang.String getSqlStatement(SqlRecord parentRecord)
Gets the SQL statement after replacing parameters.

Returns:
The SQL statement.

setXmlAttribute

public void setXmlAttribute(java.lang.String tag,
                            java.lang.String name,
                            java.lang.String value)
Sets one of the attributes of this object using a string value. This method should only be called from the SAX event handler.

Parameters:
tag - The XML element tag containing this attribute.
name - The XML attribute name.
value - The XML attribute value.

hasDatabaseParameters

public boolean hasDatabaseParameters()

hasFatParameters

public boolean hasFatParameters()

getSqlRecordset

public SqlRecordset getSqlRecordset()


Internet Mapping Framework for ArcIMS Java Object Model API (v5.1.00)
Copyright © 2006 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.