项目:BibliotecaPS
文件:JDBC4ResultSet.java
@SuppressWarnings("unchecked")
public <T> T getobject(int columnIndex,Class<T> type) throws sqlException {
if (type == null) {
throw sqlError.createsqlException("Type parameter can not be null",sqlError.sql_STATE_ILLEgal_ARGUMENT,getExceptionInterceptor());
}
if (type.equals(Struct.class)) {
throw new sqlFeatureNotSupportedException();
} else if (type.equals(RowId.class)) {
return (T) getRowId(columnIndex);
} else if (type.equals(NClob.class)) {
return (T) getNClob(columnIndex);
} else if (type.equals(sqlXML.class)) {
return (T) getsqlXML(columnIndex);
}
return super.getobject(columnIndex,type);
}
项目:BibliotecaPS
文件:JDBC4CallableStatementWrapper.java
public void setRowId(int parameterIndex,RowId x) throws sqlException {
try {
if (this.wrappedStmt != null) {
((PreparedStatement) this.wrappedStmt).setRowId(parameterIndex,x);
} else {
throw sqlError.createsqlException("No operations allowed after statement closed",sqlError.sql_STATE_GENERAL_ERROR,this.exceptionInterceptor);
}
} catch (sqlException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
}
项目:BibliotecaPS
文件:JDBC4PreparedStatementWrapper.java
private void processRootEvent() throws SyncError {
if (rootEvent.getMarker() != null && rootEvent.getMarker().isFailed()) {
return;
}
logger.debug("Started processing RootEvent");
int rowCount = 0;
map = (OracletoMongoMap) mappingDao.getMapping(rootEvent.getMapId());
MongoObject mongoObject = map.getMapObject();
getTableCount(mongoObject);
logger.info("Table Count :" + tCount);
deduceIdealRange();
logger.info("Getting Connection");
rowCount = getCount(mongoObject,rootEvent.getRangeFilter());
//idealRange =10;
logger.info("Row count for RootEvent : " + rowCount);
if (rowCount > idealRange) {
generateOptimalRange(rowCount);
if (degree > 1) {
this.rangeColumn.setTableAlias(mongoObject.getSourceTables().get(0).getTableAlias());
String tableName = mongoObject.getSourceTables().get(0).getTableName();
String query = ROW_ID_QUERY.replaceFirst("TNAME",tableName);
String rowIdQuery = ROW_ID_QUERY_GREATER_THAN_ROWID.replaceFirst("TNAME",tableName);
RowId rid = createSubEvents(query,null,tableName,false);
while (subEventCount < (degree - 1)) {
fetchCount = 0L;
rid = createSubEvents(rowIdQuery,rid,true);
}
} else {
NodeBalancer.INSTANCE.addEventToExecutor(rootEvent);
}
} else if (rowCount > 0) {
NodeBalancer.INSTANCE.addEventToExecutor(rootEvent);
} else {
eventDao.updateEventStatus(rootEvent.getEventId(),SyncStatus.COMPLETE);
}
}
项目:the-vigilantes
文件:JDBC4CallableStatementWrapper.java
项目:the-vigilantes
文件:JDBC4CallableStatementWrapper.java
public RowId getRowId(String parameterName) throws sqlException {
try {
if (this.wrappedStmt != null) {
return ((CallableStatement) this.wrappedStmt).getRowId(parameterName);
} else {
throw sqlError.createsqlException("No operations allowed after statement closed",this.exceptionInterceptor);
}
} catch (sqlException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return null;
}
private RowId createSubEvents(final String query,RowId rid,String tableName,boolean isChildQuery) throws SyncError {
logger.info("createSubEvents called with parameters : isChildQuery =" + isChildQuery + ",rid = " + rid
+ ",tableName = " + tableName + ",query = " + query);
PreparedStatement rowIdpstmt = null;
ResultSet rowIdSet = null;
RowId maxRid = null;
RowId minRid = null;
try {
rowIdpstmt = connection.prepareStatement(query,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY,ResultSet.HOLD_CURSORS_OVER_COMMIT);
if (isChildQuery) {
rowIdpstmt.setRowId(1,rid);
}
rowIdpstmt.setFetchSize(5000);
rowIdSet = rowIdpstmt.executeQuery();
rowIdSet.next();
minRid = rowIdSet.getRowId(1);
for (++subEventCount; subEventCount < (degree - 1); subEventCount++) {
rowIdSet.relative((int) optimalRange);
maxRid = rowIdSet.getRowId(1);
getSubEvent(minRid,maxRid,false);
minRid = maxRid;
fetchCount += optimalRange;
if (fetchCount > 1000000L) {
break;
}
}
if (subEventCount == (degree - 1)) {
rowIdSet.last();
maxRid = rowIdSet.getRowId(1);
getSubEvent(minRid,true);
logger.info("Total subEvents created :" + eventCount);
}
} catch (Exception e) {
logger.error("Error while creating subEvents ",e);
throw new SyncError(e);
} finally {
DbResourceUtils.closeResources(rowIdSet,rowIdpstmt,null);
}
return maxRid;
}
项目:ProyectoPacientes
文件:JDBC4CallableStatementWrapper.java
public RowId getRowId(String parameterName) throws sqlException {
try {
if (this.wrappedStmt != null) {
return ((CallableStatement) this.wrappedStmt).getRowId(parameterName);
} else {
throw sqlError.createsqlException("No operations allowed after statement closed",this.exceptionInterceptor);
}
} catch (sqlException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return null;
}
@Override
public RowId getRowId(String columnLabel) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
项目:Agent-Benchmarks
文件:SimulateResultSet.java
@Override public RowId getRowId(String columnLabel) throws sqlException {
return null;
}
项目:iotdb-jdbc
文件:TsfilePrepareStatement.java
项目:spanner-jdbc
文件:AbstractCloudSpannerResultSet.java
项目:openjdk-jdk10
文件:StubJoinRowSetImpl.java
@Override
public void updateRowId(int columnIndex,RowId x) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
项目:OpenVertretung
文件:JDBC4ResultSet.java
public void updateRowId(int columnIndex,RowId x) throws sqlException {
throw new NotUpdatable();
}
项目:incubator-netbeans
文件:ResultSetAdapter.java
@Override
public void updateRowId(int columnIndex,RowId x) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
项目:dswork.jdbc
文件:CallableStatementSpy.java
项目:openjdk-jdk10
文件:StubJdbcRowSetImpl.java
项目:blanco-sfdc-jdbc-driver
文件:BlancoGenericJdbcResultSet.java
public RowId getRowId(String columnLabel) throws sqlException {
return cacheResultSet.getRowId(columnLabel);
}
项目:ProyectoPacientes
文件:JDBC4PreparedStatement.java
项目:OpenVertretung
文件:JDBC4CallableStatement.java
项目:jdk8u-jdk
文件:StubJdbcRowSetImpl.java
项目:Saturn
文件:SyncPrepStmt.java
项目:java-jdbc
文件:TracingCallableStatement.java
项目:dswork.jdbc
文件:PreparedStatementSpy.java
项目:jdk8u-jdk
文件:StubJdbcRowSetImpl.java
@Override
public RowId getRowId(int columnIndex) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
项目:jdk8u-jdk
文件:StubBaseRowSet.java
@Override
public void updateRowId(String columnLabel,RowId x) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
项目:java-jdbc
文件:TracingCallableStatement.java
项目:openjdk-jdk10
文件:StubSyncResolver.java
@Override
public RowId getRowId(int columnIndex) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
项目:blanco-sfdc-jdbc-driver
文件:BlancoGenericJdbcResultSet.java
项目:openjdk-jdk10
文件:StubBaseRowSet.java
@Override
public void updateRowId(String columnLabel,RowId x) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void updateRowId(String columnLabel,RowId x) throws sqlException {
}
项目:BibliotecaPS
文件:JDBC4ResultSet.java
public void updateRowId(int columnIndex,RowId x) throws sqlException {
throw new NotUpdatable();
}
项目:BibliotecaPS
文件:JDBC4ResultSet.java
public RowId getRowId(String columnLabel) throws sqlException {
return getRowId(findColumn(columnLabel));
}
@Override
public RowId getRowId(String columnLabel) throws sqlException {
throw new UnsupportedOperationException("Not supported yet.");
}
项目:apache-tomcat-7.0.73-with-comment
文件:ResultSet.java
项目:preflex
文件:CallableStatementWrapper.java
项目:mycat-src-1.6.1-RELEASE
文件:SequoiaResultSet.java
@Override
public RowId getRowId(int columnIndex) throws sqlException {
return null;
}
项目:Saturn
文件:SyncRS.java
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。