Code is part of a framework that is using reflection to execute:
string fieldIndexTypeName = this.BusinessObjectCollectionType.FullName.Replace("CollectionClasses.", "").Replace("Collection", "FieldIndex");
Type fieldIndexType = this.BusinessObjectType.Assembly.GetType(fieldIndexTypeName);
Type[] types = new Type[] { fieldIndexType, typeof(IExpression), typeof(AggregateFunction), typeof(IPredicate) };
MethodInfo getScalarMethod = this.BusinessObjectCollectionType.GetMethod("GetScalar", types);
List<string> pKeys = GetDataKeyNames();
System.Reflection.FieldInfo fieldPropInfo = fieldIndexType.GetField(pKeys[0]);
object field = fieldPropInfo.GetValue(null);
object[] parameters = new object[4];
parameters[0] = field;
parameters[1] = null;
parameters[2] = AggregateFunction.CountRow;
parameters[3] = searchConfig.Filter;
decimal rowcount = (decimal)getScalarMethod.Invoke(collection, parameters);
Count query with no search criteria entered:
Query: SELECT * FROM (SELECT COUNT(*) AS "UserId" FROM "DATA"."USER_PROFILE") WHERE rownum <= 1
Count query with search criteria:
Query: SELECT * FROM (SELECT COUNT(*) AS "UserId" FROM "DATA"."USER_PROFILE" WHERE ( ( ( "DATA"."USER_PROFILE"."USER_ID" LIKE :UserId1)))) WHERE rownum <= 1
Parameter: :UserId1 : String. Length: 4. Precision: 0. Scale: 0. Direction: Input. Value: "%AD%".
Version Number: 2.6.08.1125