Package org.teiid.google
Class SpreadsheetConnectionImpl
- java.lang.Object
-
- org.teiid.google.SpreadsheetConnectionImpl
-
- All Implemented Interfaces:
Connection
,GoogleSpreadsheetConnection
public class SpreadsheetConnectionImpl extends Object implements GoogleSpreadsheetConnection
Represents a connection to an Google spreadsheet data source.
-
-
Constructor Summary
Constructors Constructor Description SpreadsheetConnectionImpl(SpreadsheetConfiguration config, AtomicReference<SpreadsheetInfo> spreadsheetInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes Google spreadsheet context, effectively closing the connection to Google spreadsheet.UpdateResult
deleteRows(Worksheet worksheet, String criteria)
RowsResult
executeQuery(Worksheet worksheet, String query, Integer offset, Integer limit, int batchSize)
UpdateResult
executeRowInsert(Worksheet worksheet, Map<String,Object> pair)
SpreadsheetInfo
getSpreadsheetInfo()
Returns information about existing Spreadsheets and worksheets.boolean
isAlive()
UpdateResult
updateRows(Worksheet worksheet, String criteria, List<UpdateSet> set)
-
-
-
Constructor Detail
-
SpreadsheetConnectionImpl
public SpreadsheetConnectionImpl(SpreadsheetConfiguration config, AtomicReference<SpreadsheetInfo> spreadsheetInfo)
-
-
Method Detail
-
close
public void close()
Closes Google spreadsheet context, effectively closing the connection to Google spreadsheet. (non-Javadoc)- Specified by:
close
in interfaceConnection
-
isAlive
public boolean isAlive()
-
executeQuery
public RowsResult executeQuery(Worksheet worksheet, String query, Integer offset, Integer limit, int batchSize)
- Specified by:
executeQuery
in interfaceGoogleSpreadsheetConnection
-
getSpreadsheetInfo
public SpreadsheetInfo getSpreadsheetInfo()
Description copied from interface:GoogleSpreadsheetConnection
Returns information about existing Spreadsheets and worksheets.- Specified by:
getSpreadsheetInfo
in interfaceGoogleSpreadsheetConnection
- Returns:
-
updateRows
public UpdateResult updateRows(Worksheet worksheet, String criteria, List<UpdateSet> set)
- Specified by:
updateRows
in interfaceGoogleSpreadsheetConnection
-
deleteRows
public UpdateResult deleteRows(Worksheet worksheet, String criteria)
- Specified by:
deleteRows
in interfaceGoogleSpreadsheetConnection
-
executeRowInsert
public UpdateResult executeRowInsert(Worksheet worksheet, Map<String,Object> pair)
- Specified by:
executeRowInsert
in interfaceGoogleSpreadsheetConnection
-
-