public void AddParameterType(InternalProcedureParameterType parameterType) { String name = parameterType.ParameterName; parameterTypeMap.put(name.ToLower(), parameterType); if (parameterType.IsReturnType) { _returnType = parameterType.ParameterPropertyType; } }
protected void RegisterParameterType(InternalProcedureMetaData metaData, Type pmbType, PropertyInfo[] properties) { foreach (PropertyInfo property in properties) { InternalProcedureParameterType ppt = GetProcedureParameterType(pmbType, property); if (ppt == null) { continue; } metaData.AddParameterType(ppt); } }
protected InternalProcedureParameterType GetProcedureParameterType(Type pmbType, PropertyInfo property) { InternalProcedureParameterInfo info = _annotationReader.GetProcedureParameter(pmbType, property); if (info == null) { return(null); } String name = info.ParameterName; String type = info.ParameterType; type = type.ToLower(); InternalProcedureParameterType ppt = new InternalProcedureParameterType(name, property); if (type.Equals("in")) { ppt.IsInType = true; ppt.ParameterDirectionType = ParameterDirection.Input; } else if (type.Equals("out")) { ppt.IsOutType = true; ppt.ParameterDirectionType = ParameterDirection.Output; } else if (type.Equals("inout")) { ppt.IsInType = true; ppt.IsOutType = true; ppt.ParameterDirectionType = ParameterDirection.InputOutput; } else if (type.Equals("return")) { // *Set false to IsOutType // The return is not out-parameter at ADO.NET! // though JDBC treats it as out-parameter. // ppt.IsOutType = true; ppt.IsReturnType = true; ppt.ParameterDirectionType = ParameterDirection.ReturnValue; } else { throw new IllegalStateException("The parameter type is wrong: type=" + type); } return(ppt); }