Author: rareddy
Date: 2009-12-16 13:37:06 -0500 (Wed, 16 Dec 2009)
New Revision: 1674
Modified:
branches/JCA/connectors/sandbox/connector-template/src/main/java/${package-name}/${connector-name}Execution.java
Log:
TEIID-907: fixing some compilation issues with template
Modified:
branches/JCA/connectors/sandbox/connector-template/src/main/java/${package-name}/${connector-name}Execution.java
===================================================================
---
branches/JCA/connectors/sandbox/connector-template/src/main/java/${package-name}/${connector-name}Execution.java 2009-12-16
17:40:05 UTC (rev 1673)
+++
branches/JCA/connectors/sandbox/connector-template/src/main/java/${package-name}/${connector-name}Execution.java 2009-12-16
18:37:06 UTC (rev 1674)
@@ -12,7 +12,6 @@
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
-import java.util.Random;
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.api.DataNotAvailableException;
@@ -31,9 +30,7 @@
import org.teiid.connector.language.IParameter.Direction;
import org.teiid.connector.metadata.runtime.RuntimeMetadata;
-import com.metamatrix.query.optimizer.relational.rules.NewCalculateCostUtil;
-
/**
* Execution of a command. This may be select, update or procedure command.
*/
@@ -88,7 +85,7 @@
@Override
public List<?> next() throws ConnectorException, DataNotAvailableException {
- // create and return one row at a time for your
+ // create and return one row at a time for your resultset.
return row;
}
@@ -121,7 +118,7 @@
//TODO: initiate the "abort" of execution
}
- private List<Class<?>> determineOutputTypes(ICommand command) throws
ConnectorException {
+ private List determineOutputTypes(ICommand command) throws ConnectorException {
// Get select columns and lookup the types in metadata
if(command instanceof IQueryCommand) {
IQueryCommand query = (IQueryCommand) command;
@@ -149,6 +146,10 @@
// TODO: this method is provided for example purposes only for creating a dummy row.
private Object getValue(Class type) {
+ Calendar cal = Calendar.getInstance();
+ cal.clear();
+ cal.set(1969, 11, 31, 18, 0, 0);
+
if(type.equals(java.lang.String.class)) {
return "some string value";
} else if(type.equals(java.lang.Integer.class)) {