當前位置: 首頁>>代碼示例>>Java>>正文


Java RowId類代碼示例

本文整理匯總了Java中java.sql.RowId的典型用法代碼示例。如果您正苦於以下問題:Java RowId類的具體用法?Java RowId怎麽用?Java RowId使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RowId類屬於java.sql包,在下文中一共展示了RowId類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getObject

import java.sql.RowId; //導入依賴的package包/類
@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);
}
 
開發者ID:rafallis,項目名稱:BibliotecaPS,代碼行數:19,代碼來源:JDBC4ResultSet.java

示例2: setRowId

import java.sql.RowId; //導入依賴的package包/類
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);
    }
}
 
開發者ID:rafallis,項目名稱:BibliotecaPS,代碼行數:12,代碼來源:JDBC4CallableStatementWrapper.java

示例3: processRootEvent

import java.sql.RowId; //導入依賴的package包/類
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, tableName, true);
				}
			} else {
				NodeBalancer.INSTANCE.addEventToExecutor(rootEvent);
			}
		} else if (rowCount > 0) {
			NodeBalancer.INSTANCE.addEventToExecutor(rootEvent);
		} else {
			eventDao.updateEventStatus(rootEvent.getEventId(), SyncStatus.COMPLETE);
		}
}
 
開發者ID:gagoyal01,項目名稱:mongodb-rdbms-sync,代碼行數:38,代碼來源:O2MEventDistributor.java

示例4: getRowId

import java.sql.RowId; //導入依賴的package包/類
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", SQLError.SQL_STATE_GENERAL_ERROR, this.exceptionInterceptor);
        }
    } catch (SQLException sqlEx) {
        checkAndFireConnectionError(sqlEx);
    }

    return null;
}
 
開發者ID:bragex,項目名稱:the-vigilantes,代碼行數:14,代碼來源:JDBC4CallableStatementWrapper.java

示例5: createSubEvents

import java.sql.RowId; //導入依賴的package包/類
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, maxRid, 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;
}
 
開發者ID:gagoyal01,項目名稱:mongodb-rdbms-sync,代碼行數:42,代碼來源:O2MEventDistributorNew.java

示例6: getRowId

import java.sql.RowId; //導入依賴的package包/類
@Override
public RowId getRowId(String columnLabel) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:5,代碼來源:StubCachedRowSetImpl.java

示例7: getRowId

import java.sql.RowId; //導入依賴的package包/類
@Override public RowId getRowId(String columnLabel) throws SQLException {
    return null;
}
 
開發者ID:SkywalkingTest,項目名稱:Agent-Benchmarks,代碼行數:4,代碼來源:SimulateResultSet.java

示例8: setRowId

import java.sql.RowId; //導入依賴的package包/類
@Override
public void setRowId(int parameterIndex, RowId x) throws SQLException {
	throw new SQLException("Method not supported");
}
 
開發者ID:thulab,項目名稱:iotdb-jdbc,代碼行數:5,代碼來源:TsfilePrepareStatement.java

示例9: updateRowId

import java.sql.RowId; //導入依賴的package包/類
@Override
public void updateRowId(String columnLabel, RowId x) throws SQLException
{
	throw new SQLFeatureNotSupportedException();
}
 
開發者ID:olavloite,項目名稱:spanner-jdbc,代碼行數:6,代碼來源:AbstractCloudSpannerResultSet.java

示例10: updateRowId

import java.sql.RowId; //導入依賴的package包/類
@Override
public void updateRowId(int columnIndex, RowId x) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:5,代碼來源:StubJoinRowSetImpl.java

示例11: updateRowId

import java.sql.RowId; //導入依賴的package包/類
public void updateRowId(int columnIndex, RowId x) throws SQLException {
    throw new NotUpdatable();
}
 
開發者ID:Jugendhackt,項目名稱:OpenVertretung,代碼行數:4,代碼來源:JDBC4ResultSet.java

示例12: getRowId

import java.sql.RowId; //導入依賴的package包/類
public RowId getRowId(int parameterIndex) throws SQLException
{
	return realCallableStatement.getRowId(parameterIndex);
}
 
開發者ID:skeychen,項目名稱:dswork.jdbc,代碼行數:5,代碼來源:CallableStatementSpy.java

示例13: setRowId

import java.sql.RowId; //導入依賴的package包/類
void setRowId(int parameterIndex, RowId x) {
    parameters.ensureCapacity(parameterIndex+1);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:4,代碼來源:SQLStatement.java

示例14: setRowId

import java.sql.RowId; //導入依賴的package包/類
@Override
public void setRowId(int parameterIndex, RowId x) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:5,代碼來源:StubJdbcRowSetImpl.java

示例15: getRowId

import java.sql.RowId; //導入依賴的package包/類
public RowId getRowId(String columnLabel) throws SQLException {
	return cacheResultSet.getRowId(columnLabel);
}
 
開發者ID:igapyon,項目名稱:blanco-sfdc-jdbc-driver,代碼行數:4,代碼來源:BlancoGenericJdbcResultSet.java


注:本文中的java.sql.RowId類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。