summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-07 09:42:15 +0200
committerMichael Stahl <mstahl@redhat.com>2012-09-10 23:43:37 +0200
commita5ff5aad59bbe70cfaa0b18ec9df6f787a7160ca (patch)
tree6313b316dc96b82e5cafec866631d15b01a04e52 /reportbuilder
parente3d9ff3fd0b753a6712e86703e5f69392d241508 (diff)
Java5 update, Convert ArrayList and Vector code to use generics
Change-Id: I6cf6fa8e55005ffdc1d173aeee1e374efbb214fd
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java10
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java4
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java6
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java6
4 files changed, 13 insertions, 13 deletions
diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
index ce8df3fc2859..d0168a645db1 100644
--- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
@@ -350,7 +350,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
IllegalArgumentException,
WrappedTargetException
{
- final ArrayList masterValues = (ArrayList) parameters.get(MASTER_VALUES);
+ final ArrayList<?> masterValues = (ArrayList<?>) parameters.get(MASTER_VALUES);
if (masterValues != null && !masterValues.isEmpty())
{
final XParameters para = (XParameters) UnoRuntime.queryInterface(XParameters.class, rowSet);
@@ -373,7 +373,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
private final Object[] createRowSet(final RowSetProperties rowSetProps, final Map<String,Object> parameters)
throws Exception
{
- final ArrayList detailColumns = (ArrayList) parameters.get(DETAIL_COLUMNS);
+ final ArrayList<?> detailColumns = (ArrayList<?>) parameters.get(DETAIL_COLUMNS);
if (rowSetProperties.containsKey(rowSetProps) && detailColumns != null && !detailColumns.isEmpty())
{
return new Object[]
@@ -438,7 +438,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
composer.setFilter((String) rowSetProp.getPropertyValue("Filter"));
}
// get old parameter count
- final ArrayList detailColumns = (ArrayList) parameters.get(DETAIL_COLUMNS);
+ final ArrayList<?> detailColumns = (ArrayList<?>) parameters.get(DETAIL_COLUMNS);
final ArrayList<String> handledColumns = new ArrayList<String>();
final XParametersSupplier paraSup = (XParametersSupplier) UnoRuntime.queryInterface(XParametersSupplier.class, composer);
if (paraSup != null)
@@ -478,7 +478,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
}
}
}
- final ArrayList masterValues = (ArrayList) parameters.get(MASTER_VALUES);
+ final ArrayList<?> masterValues = (ArrayList<?>) parameters.get(MASTER_VALUES);
if (masterValues != null && !masterValues.isEmpty() && paramDef.parameterIndex.size() != detailColumns.size())
{
// Vector masterColumns = (Vector) parameters.get("master-columns");
@@ -533,7 +533,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
WrappedTargetException,
NoSuchElementException
{
- final StringBuffer order = new StringBuffer(getOrderStatement(commandType, command, (ArrayList) parameters.get(GROUP_EXPRESSIONS)));
+ final StringBuffer order = new StringBuffer(getOrderStatement(commandType, command, (ArrayList<?>) parameters.get(GROUP_EXPRESSIONS)));
if (order.length() > 0 && commandType != CommandType.TABLE)
{
String statement = command;
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java
index 327d3349e2ab..273e26c07bcf 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java
@@ -138,8 +138,8 @@ public class PentahoReportJob implements ReportJob
throw new JobDefinitionException("A valid image-service implementation must be given.");
}
- this.masterValues = (ArrayList) jobProperties.getProperty(ReportEngineParameterNames.INPUT_MASTER_VALUES);
- this.detailColumns = (ArrayList) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DETAIL_COLUMNS);
+ this.masterValues = (ArrayList<?>) jobProperties.getProperty(ReportEngineParameterNames.INPUT_MASTER_VALUES);
+ this.detailColumns = (ArrayList<?>) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DETAIL_COLUMNS);
Integer maxRows=(Integer) jobProperties.getProperty(ReportEngineParameterNames.MAXROWS);
this.resourceManager = new ResourceManager();
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
index d538938f3e91..5c18b4884ba4 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
@@ -1674,9 +1674,9 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
{
final String classId = (String) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, "class-id");
final String chartUrl = (String) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, "href");
- final ArrayList masterColumns = (ArrayList) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.MASTER_COLUMNS);
- final ArrayList masterValues = (ArrayList) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.MASTER_VALUES);
- final ArrayList detailColumns = (ArrayList) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.DETAIL_COLUMNS);
+ final ArrayList<?> masterColumns = (ArrayList<?>) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.MASTER_COLUMNS);
+ final ArrayList<?> masterValues = (ArrayList<?>) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.MASTER_VALUES);
+ final ArrayList<?> detailColumns = (ArrayList<?>) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, SDBCReportDataFactory.DETAIL_COLUMNS);
final String href = oleProducer.produceOle(chartUrl, masterColumns, masterValues, detailColumns);
final AttributeList oleList = new AttributeList();
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java b/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java
index 8991c2bbb281..dc06fcad122d 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java
@@ -524,9 +524,9 @@ public class StyleUtilities
public static OfficeStyle queryStyleByProperties(final OfficeStylesCollection predefCollection,
final String styleFamily,
final String sectionName,
- final ArrayList propertyNamespace,
- final ArrayList propertyName,
- final ArrayList propertyValues)
+ final ArrayList<?> propertyNamespace,
+ final ArrayList<?> propertyName,
+ final ArrayList<?> propertyValues)
{
if (propertyNamespace.size() != propertyName.size())
{