private Long getSmallestId() throws SQLException
	{
		StringBuilder statement = new StringBuilder(100);
		statement.append("SELECT ");
		statement.append(Defaults.ID_COL);
		statement.append(" FROM ");
		statement.append(sourceObjectTableName);
		statement.append(" ORDER BY ");
		statement.append(Defaults.ID_COL);
		statement.append(" ASC ");
		String limitString = source.getAdapter().getLimitString();
		limitString = limitString.replaceAll("\\?", "1");
		if (source.getAdapter().isPutLimitOffsetBeforeColumns())
		{
			statement.insert(7, limitString);
		}
		else
		{
			statement.append(limitString);
		}
		PreparedStatement ps = sourceCw.prepareStatement(statement.toString());
		try
		{
			Long res = null;
			ResultSet rs = ps.executeQuery();
			if (rs.next())
			{
				res = rs.getLong(1);
			}
			return res;
		}
		finally
		{
			ps.close();
		}
	}