Author: kostat
Date: 2006-01-29 08:23:51 -0500 (Sun, 29 Jan 2006)
New Revision: 56221
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbParameterCollection.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbPortResolver.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbStringManager.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs
Log:
refactoring: correcting method signatures for reuse in other assemblies
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -116,7 +116,7 @@
private bool _hasResultSet;
private bool _explicitPrepare;
- internal static ProcedureColumnCache _procedureColumnCache =
new ProcedureColumnCache();
+ static ProcedureColumnCache _procedureColumnCache = new
ProcedureColumnCache();
#endregion // Fields
@@ -230,7 +230,7 @@
// AbstractDbCommand acts as IEnumerator over JDBC statement
// AbstractDbCommand.CurrentResultSet corresponds to
IEnumerator.Current
- internal virtual ResultSet CurrentResultSet
+ protected internal virtual ResultSet CurrentResultSet
{
get {
try {
@@ -275,7 +275,7 @@
protected abstract DbParameterCollection
CreateParameterCollection(AbstractDbCommand parent);
- protected abstract SystemException CreateException(SQLException
e);
+ protected internal abstract SystemException
CreateException(SQLException e);
protected internal void CopyTo(AbstractDbCommand target)
{
@@ -313,26 +313,13 @@
return false;
}
- protected override DbParameter CreateDbParameter()
+ protected sealed override DbParameter CreateDbParameter()
{
return CreateParameterInternal();
}
- internal void DeriveParameters ()
+ internal ArrayList DeriveParameters(string procedureName, bool
throwIfNotExist)
{
- if(CommandType != CommandType.StoredProcedure) {
- throw
ExceptionHelper.DeriveParametersNotSupported(this.GetType(),CommandType);
- }
-
- ArrayList parameters = DeriveParameters(CommandText,
true);
- Parameters.Clear();
- foreach (AbstractDbParameter param in parameters) {
- Parameters.Add(param.Clone());
- }
- }
-
- protected ArrayList DeriveParameters(string procedureName, bool
throwIfNotExist)
- {
try {
ArrayList col =
_procedureColumnCache.GetProcedureColumns((AbstractDBConnection)Connection,
procedureName, this);
if (col == null) {
@@ -1105,7 +1092,7 @@
// AbstractDbCommand acts as IEnumerator over JDBC statement
// AbstractDbCommand.NextResultSet corresponds to
IEnumerator.MoveNext
- internal virtual bool NextResultSet()
+ protected internal virtual bool NextResultSet()
{
if (!_hasResultSet)
return false;
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -38,13 +38,14 @@
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
+using System.Data.Common;
using java.sql;
using javax.sql;
using javax.naming;
// can not use java.util here - it manes ArrayList an ambiguous reference
-namespace System.Data.Common
+namespace System.Data.ProviderBase
{
public abstract class AbstractDBConnection : DbConnection
{
@@ -106,9 +107,9 @@
#region ConnectionStringHelper
- internal sealed class ConnectionStringHelper
+ public sealed class ConnectionStringHelper
{
- internal static string FindValue(NameValueCollection
collection, string[] keys)
+ public static string FindValue(NameValueCollection
collection, string[] keys)
{
if (collection == null || keys == null ||
keys.Length == 0) {
return String.Empty;
@@ -123,7 +124,7 @@
return String.Empty;
}
- internal static string FindValue(NameValueCollection
collection, string key)
+ public static string FindValue(NameValueCollection
collection, string key)
{
if (collection == null) {
return String.Empty;
@@ -133,7 +134,7 @@
return (value != null) ? value : String.Empty;
}
- internal static void UpdateValue(NameValueCollection
collection,string[] keys,string value)
+ public static void UpdateValue(NameValueCollection
collection,string[] keys,string value)
{
for(int i=0; i < keys.Length; i++) {
if (collection[keys[i]] != null) {
@@ -142,7 +143,7 @@
}
}
- internal static void AddValue(NameValueCollection
collection,string[] keys,string value)
+ public static void AddValue(NameValueCollection
collection,string[] keys,string value)
{
for(int i=0; i < keys.Length; i++) {
collection[keys[i]] = value;
@@ -153,7 +154,7 @@
* Parses connection string and builds
NameValueCollection
* for all keys.
*/
- internal static NameValueCollection BuildUserParameters
(string connectionString)
+ public static NameValueCollection BuildUserParameters
(string connectionString)
{
NameValueCollection userParameters = new
NameValueCollection();
@@ -694,9 +695,9 @@
// since WS also does not permits dynamically change of
login timeout and tomcat does no implements - do not do it at all
//ds.setLoginTimeout(ConnectionTimeout);
- internal abstract void OnSqlWarning(SQLWarning warning);
+ protected internal abstract void OnSqlWarning(SQLWarning
warning);
- internal abstract void OnStateChanged(ConnectionState orig,
ConnectionState current);
+ protected internal abstract void OnStateChanged(ConnectionState
orig, ConnectionState current);
protected abstract SystemException CreateException(SQLException
e);
@@ -979,7 +980,7 @@
}
}
- internal virtual Connection GetConnectionFromProvider()
+ protected internal virtual Connection
GetConnectionFromProvider()
{
ActivateJdbcDriver(JdbcDriverName);
DriverManager.setLoginTimeout(ConnectionTimeout);
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -81,7 +81,7 @@
set { _sourceVersion = value; }
}
- internal DbTypes.JavaSqlTypes JdbcType
+ protected internal DbTypes.JavaSqlTypes JdbcType
{
get {
if (!_isJdbcTypeSet) {
@@ -95,7 +95,7 @@
}
}
- internal bool IsJdbcTypeSet
+ protected internal bool IsJdbcTypeSet
{
get {
return _isJdbcTypeSet;
@@ -111,7 +111,7 @@
get { return _isDbTypeSet; }
}
- internal virtual bool IsSpecial {
+ protected internal virtual bool IsSpecial {
get {
return false;
}
@@ -154,17 +154,17 @@
#region Methods
- internal abstract void SetParameterName(ResultSet res);
+ protected internal abstract void SetParameterName(ResultSet
res);
- internal abstract void SetParameterDbType(ResultSet res);
+ protected internal abstract void SetParameterDbType(ResultSet
res);
- internal abstract void SetSpecialFeatures(ResultSet res);
+ protected internal abstract void SetSpecialFeatures(ResultSet
res);
public abstract object Clone();
- internal abstract DbTypes.JavaSqlTypes
JdbcTypeFromProviderType();
+ protected internal abstract DbTypes.JavaSqlTypes
JdbcTypeFromProviderType();
- internal abstract object ConvertValue(object value);
+ protected internal abstract object ConvertValue(object value);
internal void SetParameterPrecisionAndScale(ResultSet res)
{
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -33,12 +33,12 @@
using System;
using System.Data;
using System.Collections;
-using System.Data.ProviderBase;
+using System.Data.Common;
using java.io;
using java.sql;
-namespace System.Data.Common
+namespace System.Data.ProviderBase
{
public abstract class AbstractDataReader : DbDataReaderBase,
ISafeDataRecord {
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -41,7 +41,7 @@
public abstract class AbstractDbErrorCollection : ICollection,
IEnumerable {
private ArrayList _list;
- internal AbstractDbErrorCollection(SQLException e,
AbstractDBConnection connection) {
+ protected AbstractDbErrorCollection(SQLException e,
AbstractDBConnection connection) {
_list = new ArrayList();
while(e != null) {
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbParameterCollection.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbParameterCollection.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbParameterCollection.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -95,7 +95,7 @@
base.RemoveAt(parameterName);
}
- internal void OnSchemaChanging()
+ protected internal void OnSchemaChanging()
{
if (_parent != null) {
_parent.OnSchemaChanging();
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -29,8 +29,9 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Data.Common;
-namespace System.Data.Common
+namespace System.Data.ProviderBase
{
using java.sql;
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbPortResolver.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbPortResolver.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++ trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbPortResolver.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -34,7 +34,7 @@
using java.net;
-namespace System.Data.Common
+namespace System.Data.ProviderBase
{
internal sealed class DbPortResolver
{
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbStringManager.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbStringManager.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++ trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbStringManager.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -33,7 +33,7 @@
using System.Resources;
using System.Reflection;
-namespace System.Data.Common
+namespace System.Data.ProviderBase
{
public class DbStringManager
{
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -33,7 +33,7 @@
using java.sql;
-namespace System.Data.Common
+namespace System.Data.ProviderBase
{
public class ParameterMetadataWrapper : java.sql.ResultSetMetaData
{
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs
2006-01-29 13:21:22 UTC (rev 56220)
+++ trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs
2006-01-29 13:23:51 UTC (rev 56221)
@@ -32,7 +32,7 @@
using System;
using java.sql;
-namespace System.Data.Common
+namespace System.Data.ProviderBase
{
public interface IReaderCacheContainer
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches