blob: 38bbf383e96e84b4671c4045a6bed7d78d7556c2 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.xtext.datamart.common.sql;
import java.io.InputStream;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.NClob;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.jbpm.task.query.TaskSummary;
import org.olap4j.Cell;
import org.olap4j.CellSet;
import org.olap4j.CellSetAxis;
import org.olap4j.CellSetMetaData;
import org.olap4j.OlapException;
import org.olap4j.OlapStatement;
import org.olap4j.Position;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.osbp.dsl.common.datatypes.IDto;
import org.eclipse.osbp.utils.common.EntityUtils;
import org.eclipse.osbp.ui.api.datamart.IDataMart.EType;
import org.eclipse.osbp.xtext.datamart.common.DatamartDtoMapper;
class TaskMetaInfo {
String type;
Integer ordinal;
TaskMetaInfo(String type, Integer ordinal) {
this.type = type;
this.ordinal = ordinal;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Integer getOrdinal() {
return ordinal;
}
public void setOrdinal(Integer ordinal) {
this.ordinal = ordinal;
}
}
public class SqlCellSet implements CellSet {
private static final Logger LOGGER = LoggerFactory.getLogger(SqlCellSet.class);
private final List<Cell[]> fCells;
private final List<CellSetAxis> fAxes;
private final List<SqlCellSetAxis> sqlAxes;
private final Map<String, TaskMetaInfo> taskMetaData = new HashMap<String, TaskMetaInfo>() {{
put("Name", new TaskMetaInfo("String", 0));
put("Priority", new TaskMetaInfo("Integer", 1));
put("Status", new TaskMetaInfo("Integer", 2));
put("Subject", new TaskMetaInfo("String", 3));
put("Description", new TaskMetaInfo("String", 4));
put("ExpirationTime", new TaskMetaInfo("Date", 5));
put("CreatedOn", new TaskMetaInfo("Date", 6));
put("CreatedBy", new TaskMetaInfo("String", 7));
put("ActivationTime", new TaskMetaInfo("Date", 8));
put("ActualOwner", new TaskMetaInfo("String", 9));
put("TaskId", new TaskMetaInfo("Long", 10));
put("ProcessId", new TaskMetaInfo("String", 11));
put("ProcessInstanceId",new TaskMetaInfo("Long", 12));
put("ProcessSessionId", new TaskMetaInfo("Integer", 13));
}};
private OperativeDtoContainer operativeDtoContainer = null;
public SqlCellSet(List<TaskSummary> tasks, HashMap<Integer,ArrayList<String>> axisMap) {
fCells = new ArrayList<Cell[]>();
fAxes = new ArrayList<CellSetAxis>();
sqlAxes = new ArrayList<SqlCellSetAxis>();
int numColumns = taskMetaData.keySet().size();
if (!axisMap.keySet().isEmpty()) {
for (int axisNumber : axisMap.keySet()) {
SqlCellSetAxis sqlCellSetAxis = new SqlCellSetAxis(this, axisNumber);
if (axisNumber == 0) { // the columns axis
int ordinal = 0;
for (String columnLabel : axisMap.get(0)) {
sqlCellSetAxis.addPosition(axisNumber, ordinal, taskMetaData.get(columnLabel).getType(), columnLabel, columnLabel);
ordinal ++;
}
}
sqlAxes.add(sqlCellSetAxis);
}
}
else {
SqlCellSetAxis sqlCellSetAxis = new SqlCellSetAxis(this, 0);
int idx = 0;
for (String columnLabel : taskMetaData.keySet()) {
sqlCellSetAxis.addPosition(0, idx++, taskMetaData.get(columnLabel).getType(), columnLabel, columnLabel);
}
sqlAxes.add(sqlCellSetAxis);
}
// add a default row axis if none given
if (axisMap.keySet().size() < 2) {
SqlCellSetAxis sqlCellSetAxis = new SqlCellSetAxis(this, 1);
sqlAxes.add(sqlCellSetAxis);
}
if (numColumns > 0) {
int rowNo = 0;
for(TaskSummary task : tasks) {
Cell[] row = null;
if (!axisMap.keySet().isEmpty()) {
int numCols = axisMap.get(0).size();
row = new Cell[numCols];
}
else {
row = new Cell[numColumns];
}
String formattedValue;
Object value;
if (!axisMap.keySet().isEmpty()) {
for (int axisNumber : axisMap.keySet()) {
int ordinal = 0;
for (String columnLabel : axisMap.get(axisNumber)) {
formattedValue = getFormattedValue(task, columnLabel);
value = getValue(task, columnLabel);
if (axisMap.keySet().size() > 1 && axisMap.get(1).contains(columnLabel)) {
sqlAxes.get(1).addPosition(1, rowNo, columnLabel, formattedValue, formattedValue);
}
else {
row[ordinal] = new SqlCell(this, rowNo, ordinal, value, formattedValue, false, null);
ordinal ++;
}
}
}
}
else {
int colNo = 0;
for (String columnLabel : taskMetaData.keySet()) {
formattedValue = getFormattedValue(task, columnLabel);
value = getValue(task, columnLabel);
row[colNo] = new SqlCell(this, rowNo, colNo, value, formattedValue, false, null);
colNo ++;
}
}
if (axisMap.keySet().size() < 2) {
sqlAxes.get(1).addPosition(0, rowNo, "", "", "");
}
fCells.add(row);
rowNo++;
}
for(SqlCellSetAxis axis : sqlAxes) {
fAxes.add(axis);
}
}
}
private Object getValue(TaskSummary task, String column){
switch(column) {
case "Name": return task.getName()!=null ?task.getName():"";
case "Priority": return task.getPriority();
case "Status": return task.getStatus()!=null ? task.getStatus().ordinal() : 0;
case "Subject": return task.getSubject()!=null?task.getSubject():"";
case "Description": return task.getDescription()!=null?task.getDescription():"";
case "ExpirationTime": return task.getExpirationTime();
case "CreatedOn": return task.getCreatedOn();
case "CreatedBy": return task.getCreatedBy()!=null ? task.getCreatedBy().getId() : "";
case "ActivationTime": return task.getActivationTime();
case "ActualOwner": return task.getActualOwner()!= null ? task.getActualOwner().getId() : "";
case "TaskId": return task.getId();
case "ProcessId": return task.getProcessId();
case "ProcessInstanceId": return task.getProcessInstanceId();
case "ProcessSessionId": return task.getProcessSessionId();
default: return null;
}
}
private String getFormattedValue(TaskSummary task, String column){
switch(column) {
case "Name": return task.getName();
case "Priority":
return Integer.toString(task.getPriority());
case "Status":
return task.getStatus().name();
case "Subject": return task.getSubject();
case "Description": return task.getDescription();
case "ExpirationTime":
if (task.getExpirationTime() != null) {
return task.getExpirationTime().toString();
}
return null;
case "CreatedOn":
if (task.getCreatedOn() != null) {
return task.getCreatedOn().toString();
}
return null;
case "CreatedBy":
if (task.getCreatedBy() != null) {
return task.getCreatedBy().toString();
}
return null;
case "ActivationTime":
if (task.getActivationTime() != null) {
return task.getActivationTime().toString();
}
return null;
case "ActualOwner":
if (task.getActualOwner() != null) {
return task.getActualOwner().toString();
}
return null;
case "TaskId":
return Long.toString(task.getId());
case "ProcessId":
return task.getProcessId();
case "ProcessInstanceId":
return Long.toString(task.getProcessInstanceId());
case "ProcessSessionId":
return Integer.toString(task.getProcessSessionId());
default:
return null;
}
}
private boolean isId(String columnName, HashMap<String, EType> idMap) {
return idMap.keySet().iterator().hasNext() && columnName.equals(idMap.keySet().iterator().next());
}
private EType getType(String columnName, HashMap<String, EType> idMap) {
if(idMap.keySet().iterator().hasNext()) {
return idMap.get(idMap.keySet().iterator().next());
}
return null;
}
public SqlCellSet(ResultSet rs, HashMap<Integer,ArrayList<String>> axisMap, HashMap<String, EType> idMap, DatamartDtoMapper datamartDtoMapper, Class<?> operativeDtoClass, List<IDto> operativeDtos) {
operativeDtoContainer = null;
fCells = new ArrayList<>();
fAxes = new ArrayList<>();
sqlAxes = new ArrayList<SqlCellSetAxis>();
int numColumns = 0;
SqlCellSetAxis sqlCellSetAxis = null;
try {
numColumns = rs.getMetaData().getColumnCount();
} catch (SQLException e) {
LOGGER.error(e.getLocalizedMessage());
return;
}
try {
if (!axisMap.keySet().isEmpty()) {
for (int axisNumber : axisMap.keySet()) {
sqlCellSetAxis = new SqlCellSetAxis(this, axisNumber);
if (axisNumber == 0) { // the columns axis
int ordinal = 0;
for (String columnLabel : axisMap.get(0)) {
try {
int columnIdx = rs.findColumn(columnLabel);
sqlCellSetAxis.addPosition(axisNumber, ordinal, rs.getMetaData().getColumnClassName(columnIdx), rs.getMetaData().getColumnName(columnIdx), rs.getMetaData().getColumnLabel(columnIdx));
ordinal ++;
} catch (SQLException e) {}
}
}
sqlAxes.add(sqlCellSetAxis);
}
}
else {
sqlCellSetAxis = new SqlCellSetAxis(this, 0);
for (int idx=1; idx<=numColumns; idx++) {
sqlCellSetAxis.addPosition(0, idx-1, rs.getMetaData().getColumnClassName(idx), rs.getMetaData().getColumnName(idx), rs.getMetaData().getColumnLabel(idx));
}
sqlAxes.add(sqlCellSetAxis);
}
} catch (SQLException e) {
LOGGER.error(e.getLocalizedMessage());
return;
}
// add a default row axis if none given
if (axisMap.keySet().size() < 2) {
sqlCellSetAxis = new SqlCellSetAxis(this, 1);
sqlAxes.add(sqlCellSetAxis);
}
if (numColumns > 0) {
try {
int targetRowNo = 0;
while (rs.next()) {
if (operativeDtoContainer == null) {
operativeDtoContainer = new OperativeDtoContainer(datamartDtoMapper, operativeDtoClass, operativeDtos);
}
boolean displayRow = true;
if (operativeDtoContainer.getOperativeDtoIdColumn() != null) {
int columnIdx = rs.findColumn(operativeDtoContainer.getOperativeDtoIdColumn());
Object value = rs.getObject(columnIdx);
displayRow = (operativeDtoContainer.getOperativeDtoForId(value) != null);
}
if (displayRow) {
Cell[] row = null;
if (axisMap.keySet().size() > 1) {
int numCols = 0;
for (int idx=1; idx<=numColumns; idx++) {
String columnName = rs.getMetaData().getColumnName(idx).toLowerCase();
if (!axisMap.get(1).contains(columnName)) {
numCols ++;
}
}
row = new Cell[numCols];
}
else {
row = new Cell[numColumns];
}
int colNo = 0;
String formattedValue;
Object value;
if ( !axisMap.keySet().isEmpty() ) {
for (int axisNumber : axisMap.keySet()) {
int ordinal = 0;
for (String columnLabel : axisMap.get(axisNumber)) {
try {
int columnIdx = rs.findColumn(columnLabel);
formattedValue = getFormattedValue(rs, columnIdx);
value = rs.getObject(columnIdx);
if (axisMap.keySet().size() > 1 && axisMap.get(1).contains(columnLabel)) {
sqlAxes.get(1).addPosition(1, targetRowNo, columnLabel, formattedValue, formattedValue);
}
else {
row[ordinal] = new SqlCell(this, targetRowNo, ordinal, value, formattedValue, isId(columnLabel, idMap), getType(columnLabel, idMap));
ordinal ++;
}
} catch (SQLException e) {}
}
}
}
else {
for (int idx=1; idx<=numColumns; idx++) {
String columnLabel = rs.getMetaData().getColumnLabel(idx);
formattedValue = getFormattedValue(rs, idx);
value = rs.getObject(idx);
row[colNo] = new SqlCell(this, targetRowNo, colNo, value, formattedValue, isId(columnLabel, idMap), getType(columnLabel, idMap));
colNo ++;
}
}
if (axisMap.keySet().size() < 2) {
sqlAxes.get(1).addPosition(0, targetRowNo, "", "", "");
}
fCells.add(row);
targetRowNo++;
}
}
}
catch (SQLException e) {
LOGGER.error(e.getLocalizedMessage());
}
for(SqlCellSetAxis axis : sqlAxes) {
fAxes.add(axis);
}
}
}
public OperativeDtoContainer getOperativeDtoContainer() {
return operativeDtoContainer;
}
private String getFormattedValue(ResultSet rs, int idx) throws SQLException {
int type = rs.getMetaData().getColumnType(idx);
String formattedValue = "";
switch (type) {
case java.sql.Types.DATE:
case java.sql.Types.TIME:
case java.sql.Types.TIMESTAMP:
if (rs.getDate(idx)!=null) {
formattedValue = rs.getDate(idx).toString();
}
break;
case java.sql.Types.TINYINT:
case java.sql.Types.SMALLINT:
case java.sql.Types.INTEGER:
case java.sql.Types.BIGINT:
case java.sql.Types.BOOLEAN:
formattedValue = Integer.toString(rs.getInt(idx));
break;
case java.sql.Types.DECIMAL:
case java.sql.Types.NUMERIC:
case java.sql.Types.DOUBLE:
formattedValue = Double.toString(rs.getDouble(idx));
break;
case java.sql.Types.FLOAT:
formattedValue = Float.toString(rs.getFloat(idx));
break;
case java.sql.Types.CHAR:
case java.sql.Types.NCHAR:
case java.sql.Types.NVARCHAR:
case java.sql.Types.VARCHAR:
formattedValue = rs.getString(idx);
break;
case java.sql.Types.BLOB:
case java.sql.Types.CLOB:
case java.sql.Types.NCLOB:
formattedValue = "LOB";
break;
case java.sql.Types.DATALINK:
formattedValue = "DATALINK";
break;
case java.sql.Types.SQLXML:
formattedValue = "SQLXML";
break;
case java.sql.Types.ROWID:
RowId rowid = rs.getRowId(idx);
formattedValue = new String(rowid.getBytes());
break;
}
return formattedValue;
}
@Override
public List<CellSetAxis> getAxes() {
return fAxes;
}
@Override
public Cell getCell(List<Integer> position) {
try {
switch (fAxes.size()) {
case 2:
return fCells.
get(position.get(1))
[position.get(0)];
case 1:
case 3:
case 4:
case 5:
default:
return null;
}
}
catch (Exception e) {
LOGGER.error("SqlCellSet.getCell(): "+e.getClass().getSimpleName()+": "+e.getMessage());
}
return null;
}
/* ============== NOT NEEDED NOW ============== */
@Override
public boolean next() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public void close() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public boolean wasNull() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public String getString(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean getBoolean(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public byte getByte(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public short getShort(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getInt(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public long getLong(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public float getFloat(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public double getDouble(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public BigDecimal getBigDecimal(int columnIndex, int scale)
throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public byte[] getBytes(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Date getDate(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Time getTime(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Timestamp getTimestamp(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public InputStream getAsciiStream(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public InputStream getUnicodeStream(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public InputStream getBinaryStream(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public String getString(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean getBoolean(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public byte getByte(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public short getShort(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getInt(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public long getLong(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public float getFloat(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public double getDouble(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public BigDecimal getBigDecimal(String columnLabel, int scale)
throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public byte[] getBytes(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Date getDate(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Time getTime(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Timestamp getTimestamp(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public InputStream getAsciiStream(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public InputStream getUnicodeStream(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public InputStream getBinaryStream(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public SQLWarning getWarnings() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public void clearWarnings() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public String getCursorName() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Object getObject(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Object getObject(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public int findColumn(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public Reader getCharacterStream(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Reader getCharacterStream(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isBeforeFirst() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isAfterLast() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isFirst() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isLast() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public void beforeFirst() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void afterLast() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public boolean first() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean last() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public int getRow() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean absolute(int row) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean relative(int rows) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean previous() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public void setFetchDirection(int direction) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getFetchDirection() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void setFetchSize(int rows) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getFetchSize() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getType() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getConcurrency() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean rowUpdated() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean rowInserted() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean rowDeleted() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public void updateNull(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBoolean(int columnIndex, boolean x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateByte(int columnIndex, byte x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateShort(int columnIndex, short x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateInt(int columnIndex, int x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateLong(int columnIndex, long x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateFloat(int columnIndex, float x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateDouble(int columnIndex, double x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBigDecimal(int columnIndex, BigDecimal x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateString(int columnIndex, String x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBytes(int columnIndex, byte[] x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateDate(int columnIndex, Date x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateTime(int columnIndex, Time x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateTimestamp(int columnIndex, Timestamp x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateAsciiStream(int columnIndex, InputStream x, int length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBinaryStream(int columnIndex, InputStream x, int length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCharacterStream(int columnIndex, Reader x, int length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateObject(int columnIndex, Object x, int scaleOrLength)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateObject(int columnIndex, Object x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNull(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBoolean(String columnLabel, boolean x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateByte(String columnLabel, byte x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateShort(String columnLabel, short x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateInt(String columnLabel, int x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateLong(String columnLabel, long x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateFloat(String columnLabel, float x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateDouble(String columnLabel, double x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBigDecimal(String columnLabel, BigDecimal x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateString(String columnLabel, String x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBytes(String columnLabel, byte[] x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateDate(String columnLabel, Date x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateTime(String columnLabel, Time x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateTimestamp(String columnLabel, Timestamp x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateAsciiStream(String columnLabel, InputStream x, int length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBinaryStream(String columnLabel, InputStream x, int length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCharacterStream(String columnLabel, Reader reader,
int length) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateObject(String columnLabel, Object x, int scaleOrLength)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateObject(String columnLabel, Object x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void insertRow() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateRow() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void deleteRow() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void refreshRow() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void cancelRowUpdates() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void moveToInsertRow() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void moveToCurrentRow() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public Object getObject(int columnIndex, Map<String, Class<?>> map)
throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Ref getRef(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Blob getBlob(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Clob getClob(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Array getArray(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Object getObject(String columnLabel, Map<String, Class<?>> map)
throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Ref getRef(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Blob getBlob(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Clob getClob(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Array getArray(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Date getDate(int columnIndex, Calendar cal) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Date getDate(String columnLabel, Calendar cal) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Time getTime(int columnIndex, Calendar cal) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Time getTime(String columnLabel, Calendar cal) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Timestamp getTimestamp(int columnIndex, Calendar cal)
throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Timestamp getTimestamp(String columnLabel, Calendar cal)
throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public URL getURL(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public URL getURL(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public void updateRef(int columnIndex, Ref x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateRef(String columnLabel, Ref x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBlob(int columnIndex, Blob x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBlob(String columnLabel, Blob x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateClob(int columnIndex, Clob x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateClob(String columnLabel, Clob x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateArray(int columnIndex, Array x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateArray(String columnLabel, Array x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public RowId getRowId(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public RowId getRowId(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public void updateRowId(int columnIndex, RowId x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateRowId(String columnLabel, RowId x) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getHoldability() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean isClosed() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public void updateNString(int columnIndex, String nString)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNString(String columnLabel, String nString)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNClob(String columnLabel, NClob nClob)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public NClob getNClob(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public NClob getNClob(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public SQLXML getSQLXML(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public SQLXML getSQLXML(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public void updateSQLXML(int columnIndex, SQLXML xmlObject)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateSQLXML(String columnLabel, SQLXML xmlObject)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public String getNString(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public String getNString(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Reader getNCharacterStream(int columnIndex) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Reader getNCharacterStream(String columnLabel) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public void updateNCharacterStream(int columnIndex, Reader x, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNCharacterStream(String columnLabel, Reader reader,
long length) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateAsciiStream(int columnIndex, InputStream x, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBinaryStream(int columnIndex, InputStream x, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCharacterStream(int columnIndex, Reader x, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateAsciiStream(String columnLabel, InputStream x, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBinaryStream(String columnLabel, InputStream x,
long length) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCharacterStream(String columnLabel, Reader reader,
long length) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBlob(int columnIndex, InputStream inputStream, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBlob(String columnLabel, InputStream inputStream,
long length) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateClob(int columnIndex, Reader reader, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateClob(String columnLabel, Reader reader, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNClob(int columnIndex, Reader reader, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNClob(String columnLabel, Reader reader, long length)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNCharacterStream(int columnIndex, Reader x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNCharacterStream(String columnLabel, Reader reader)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateAsciiStream(int columnIndex, InputStream x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBinaryStream(int columnIndex, InputStream x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCharacterStream(int columnIndex, Reader x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateAsciiStream(String columnLabel, InputStream x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBinaryStream(String columnLabel, InputStream x)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCharacterStream(String columnLabel, Reader reader)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBlob(int columnIndex, InputStream inputStream)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBlob(String columnLabel, InputStream inputStream)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateClob(int columnIndex, Reader reader) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateClob(String columnLabel, Reader reader)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNClob(int columnIndex, Reader reader) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNClob(String columnLabel, Reader reader)
throws SQLException {
// TODO Auto-generated method stub
}
@Override
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public <T> T getObject(String columnLabel, Class<T> type)
throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public int coordinatesToOrdinal(List<Integer> arg0) {
// TODO Auto-generated method stub
return 0;
}
@Override
public Cell getCell(int arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public Cell getCell(Position... arg0) {
if (arg0.length == 2) {
Position x = arg0[1];
Position y = arg0[0];
try {
switch (fAxes.size()) {
case 2:
try {
return fCells.get(x.getOrdinal())[y.getOrdinal()];
} catch (ArrayIndexOutOfBoundsException e) {
return null;
}
case 1:
case 3:
case 4:
case 5:
default:
return null;
}
}
catch (Exception e) {
e.printStackTrace();
}
}
else {
throw new IllegalArgumentException("only 2 dimensional axes are supported for now");
}
return null;
}
@Override
public CellSetAxis getFilterAxis() {
// TODO Auto-generated method stub
return null;
}
@Override
public CellSetMetaData getMetaData() throws OlapException {
// TODO Auto-generated method stub
return null;
}
@Override
public OlapStatement getStatement() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public List<Integer> ordinalToCoordinates(int arg0) {
// TODO Auto-generated method stub
return null;
}
}