From 3cfd1156cc56dfe867c1d0295d284fdec67b185a Mon Sep 17 00:00:00 2001 From: John Woodlock Date: Wed, 30 May 2012 17:16:52 +1000 Subject: [PATCH] update api docs and small additional data code changes --- APIFolder/api.htm | 586 +++++++++--------- APIFolder/docUpdateComments.txt | 11 + .../ReadExtraDataAndReportingServiceImpl.java | 22 +- 3 files changed, 306 insertions(+), 313 deletions(-) diff --git a/APIFolder/api.htm b/APIFolder/api.htm index 33dbfb721..41327979b 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -526,7 +526,7 @@ JSON examples:

List Clients

-

Example Request:

+

Example Requests:

https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true

https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true&fields=displayName,officeName,joinedDate @@ -602,7 +602,7 @@ JSON examples:

Retrieve a Client

-

Example Request:

+

Example Requests:

https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true

https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true&template=true @@ -691,7 +691,7 @@ Request Body: in a specific use case of the Individual Lending User Interface.
However, it is quite reasonable to add resources like this to simplify User Interface development.

-

Example Request:

+

Example Requests:

https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true

https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true&fields=openLoans,%20closedLoans,activeLoanCount @@ -745,7 +745,7 @@ Request Body:

Note: Notes are returned in descending createOn order.

-

Example Request:

+

Example Requests:

https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true

https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true&fields=note,createdOn,createdByUsername @@ -808,7 +808,7 @@ Request Body:

Retrieve a Client Note

-

Example Request:

+

Example Requests:

https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true

https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true&fields=note,createdOn,createdByUsername @@ -901,15 +901,15 @@ Request Body:
Arguments
clientId
-
Integer
-
The 'id' of the Client
+
Integer mandatory
productId
-
Integer
-
The 'id' of the Loan Product
+
Integer optional
+
If entered, productId, productName and selectedProduct fields are returned.
-

Example Request: - https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1 -

+

Example Requests:

+ https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1&pretty=true +

+ https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&pretty=true
GET https://thedomainname/api/v1/loans/template @@ -2558,13 +2558,16 @@ Request Body:{ In Mifos X, any number of "Sets" of "Additional Fields" can be configured for a Mifos X database table ("Type").

For example, portfolio_client is the database table that holds client data. Typically, MFI's want more client related fields than is provided by Mifos X out-of-the-box. - The MFI might add a Set called "Additional Info" containing some fields that are typically input when creating a client. They might then add another Set called "Highly Improbable Info" containing some fields that are only input in exceptional circumstances. + The MFI might add a Set called "Additional Info" containing some fields that are typically input when creating a client. + They might then add another Set called "Highly Improbable Info" containing some fields that are only input in exceptional + circumstances.

The additional fields resource allows you to retrieve and update any Additional Fields data that has been configured in Mifos X.

- The Mifos X Individual Lending client application uses a JQuery plugin called stretchydata which, itself, uses this additional fields resource to provide a pretty flexible additional fields User Interface (UI). Put a link to an example here. + The Mifos X Individual Lending client application uses a JQuery plugin called stretchydata which, itself, uses this + additional fields resource to provide a pretty flexible additional fields User Interface (UI).

@@ -2584,26 +2587,26 @@ Request Body:{
optional
The Additional Fields Type (Mifos X database table) to restrict the output to
-

Example Request: - https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client -

+

Example Requests:

+ https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client&pretty=true +

+ https://localhost:8443/mifosng-provider/api/v1/additionalfields?pretty=true
GET https://thedomainname/api/v1/additionalfields - { - "additionalFieldsSets": [ - { - "id": 1, - "name": "Additional Information", - "type": "portfolio_client" - }, - { - "id": 9, - "name": "Highly Improbable Info", - "type": "portfolio_client" - } - ] - } + [ { + "id" : 1, + "name" : "Additional Information", + "type" : "portfolio_client" +}, { + "id" : 8, + "name" : "Additional Information", + "type" : "portfolio_loan" +}, { + "id" : 9, + "name" : "Highly Improbable Info", + "type" : "portfolio_client" +} ]
@@ -2617,125 +2620,71 @@ Request Body:{ Returns the Set of Additional Fields data for the ID provided. The ID is the id field of the Type table e.g. portfolio_client might have an id value of 4. The output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. The Column Heading information may include allowed values (columnValues array).

Example Request: - https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2 + https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2?pretty=true

GET https://thedomainname/api/v1/additionalfields/{type}/{set}/{id} { - "columnHeaders": [ - { - "columnName": "Ethnic Group", - "columnType": "String", - "columnLength": 50, - "columnDisplayType": "List", - "columnValues": [ - "Bedouin", - "Berber", - "Italian", - "Miknasa", - "Mrazig", - "Other", - "Unknown" - ] - }, - { - "columnName": "Ethnic Group Other", - "columnType": "String", - "columnLength": 50, - "columnDisplayType": null, - "columnValues": [] - }, - { - "columnName": "Household Location", - "columnType": "String", - "columnLength": 50, - "columnDisplayType": "List", - "columnValues": [ - "East Sikkim", - "North Sikkim", - "South Sikkim", - "West Sikkim", - "Other" - ] - }, - { - "columnName": "Household Location Other", - "columnType": "String", - "columnLength": 50, - "columnDisplayType": null, - "columnValues": [] - }, - { - "columnName": "Religion", - "columnType": "String", - "columnLength": 50, - "columnDisplayType": "List", - "columnValues": [ - "Protestant", - "Catholic", - "Muslim", - "Animist", - "Atheist", - "Other", - "Unknown" - ] - }, - { - "columnName": "Religion Other", - "columnType": "String", - "columnLength": 50, - "columnDisplayType": null, - "columnValues": [] - }, - { - "columnName": "Knowledge of Person", - "columnType": "String", - "columnLength": 50, - "columnDisplayType": "List", - "columnValues": [ - "Staff member", - "Spouse of staff member", - "Son/daughter of staff member", - "Friend of staff member", - "Not known by any staff member", - "Other" - ] - }, - { - "columnName": "Gender", - "columnType": "String", - "columnLength": 10, - "columnDisplayType": "List", - "columnValues": [ - "Female", - "Male" - ] - }, - { - "columnName": "Whois", - "columnType": "Text", - "columnLength": 0, - "columnDisplayType": null, - "columnValues": [] - } - ], - "data": [ - { - "row": [ - "Berber", - null, - "East Sikkim", - null, - "Animist", - "jjjjjjj", - "Son/daughter of staff member", - "Female", - "its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all" - ] - } - ] - } + "columnHeaders" : [ { + "columnName" : "Ethnic Group", + "columnType" : "String", + "columnLength" : 50, + "columnDisplayType" : "List", + "columnValues" : [ "Bedouin", "Berber", "Italian", "Miknasa", "Mrazig", "Other", "Unknown" ] + }, { + "columnName" : "Ethnic Group Other", + "columnType" : "String", + "columnLength" : 50, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "Household Location", + "columnType" : "String", + "columnLength" : 50, + "columnDisplayType" : "List", + "columnValues" : [ "East Sikkim", "North Sikkim", "South Sikkim", "West Sikkim", "Other" ] + }, { + "columnName" : "Household Location Other", + "columnType" : "String", + "columnLength" : 50, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "Religion", + "columnType" : "String", + "columnLength" : 50, + "columnDisplayType" : "List", + "columnValues" : [ "Protestant", "Catholic", "Muslim", "Animist", "Atheist", "Other", "Unknown" ] + }, { + "columnName" : "Religion Other", + "columnType" : "String", + "columnLength" : 50, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "Knowledge of Person", + "columnType" : "String", + "columnLength" : 50, + "columnDisplayType" : "List", + "columnValues" : [ "Staff member", "Spouse of staff member", "Son/daughter of staff member", "Friend of staff member", "Not known by any staff member", "Other" ] + }, { + "columnName" : "Gender", + "columnType" : "String", + "columnLength" : 10, + "columnDisplayType" : "List", + "columnValues" : [ "Female", "Male" ] + }, { + "columnName" : "Whois", + "columnType" : "Text", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + } ], + "data" : [ { + "row" : [ "Bedouin", null, "East Sikkim", null, "Animist", "Agnostic", "Friend of staff member", "Female", "A person of honesty & clear thought" ] + } ] +}
@@ -2749,50 +2698,44 @@ Request Body:{
POST https://thedomainname/api/v1/additionalfields/{type}/{set}/{id} - https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2 - - - Content-Type: application/json - Request Body: - { - "Ethnic_Group":"Berber", - "Ethnic_Group_Other":"", - "Household_Location":"East Sikkim", - "Household_Location_Other":"", - "Religion":"Animist", - "Religion_Other":"jjjjjjj", - "Knowledge_of_Person":"Son/daughter of staff member", - "Gender":"Female", - "Whois":"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all" - } - + POST https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2 +Content-Type: application/json +Request Body: +{ + "Ethnic_Group":"Berber", + "Ethnic_Group_Other":"", + "Household_Location":"East Sikkim", + "Household_Location_Other":"", + "Religion":"Animist", + "Religion_Other":"jjjjjjj", + "Knowledge_of_Person":"Son/daughter of staff member", + "Gender":"Female", + "Whois":"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all" +} + { - "entityId": 2 - } + "entityId": 2 +}
- - - - -  

Reports

- The reports resource allows you to run and receive output from pre-defined Mifos X reports. The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URI. + The reports resource allows you to run and receive output from pre-defined Mifos X reports. + The default output is a JSON formatted "Generic Resultset". + The Generic Resultset contains Column Heading as well as Data information. + However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URL.

If Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.

- -

Add examples showing links to client listing report producing json, then csv, then a pentaho report producing html, pdf, csv

-

- The Mifos X Individual Lending client application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI). Put a link to an example here. +

+ The Mifos X Individual Lending client application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).

@@ -2813,82 +2756,105 @@ Request Body:{
optional, The only valid value is 'true'. If any other value is provided the argument will be ignored
Output will be delivered as a CSV file instead of JSON.
-

Example Request: - https://localhost:8443/mifosng-provider/api/v1/reports -

+

Example Requests:

+ https://localhost:8443/mifosng-provider/api/v1/reports?pretty=true +

+ https://localhost:8443/mifosng-provider/api/v1/reports?pretty=true&exportCSV=true
GET https://thedomainname/api/v1/reports { - "columnHeaders": [ - { - "columnName": "report_id", - "columnType": "INT", - "columnLength": null, - "columnDisplayType": null, - "columnValues": [] - }, - { - "columnName": "report_name", - "columnType": "VARCHAR", - "columnLength": null, - "columnDisplayType": null, - "columnValues": [] - }, - { - "columnName": "report_type", - "columnType": "VARCHAR", - "columnLength": null, - "columnDisplayType": null, - "columnValues": [] - }, - ... more "columnHeaders" entries - ], - "data": [ - { - "row": [ - "29", - "Client Listing", - "Table", - null, - null, - "5", - null, - "selectOfficeId" - ] - }, - { - "row": [ - "42", - "Client Listing - Additional and Unlikely", - "Table", - null, - null, - "5", - null, - "selectOfficeId" - ] - }, - { - "row": [ - "30", - "Client Loans Listing", - "Table", - null, - null, - "5", - null, - "selectOfficeId" - ] - }, - ... more "Row" entries - ] - } + "columnHeaders" : [ { + "columnName" : "report_id", + "columnType" : "INT", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "report_name", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "report_type", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "report_subtype", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "report_category", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "parameter_id", + "columnType" : "INT", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "report_parameter_name", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "parameter_name", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + } ], + "data" : [ { + "row" : [ "29", "Client Listing", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "42", "Client Listing - Additional and Unlikely", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "30", "Client Loans Listing", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "43", "Client Loans Listing - Additional", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "41", "Clients by Surname (a bit silly)", "Chart", "Pie", null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "39", "Loan Disbursals in Previous Year", "Chart", "Bar", null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "39", "Loan Disbursals in Previous Year", "Chart", "Bar", null, "7", null, "currencyIdSelectOne" ] + }, { + "row" : [ "40", "Loan Repayments in Previous Year", "Chart", "Bar", null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "40", "Loan Repayments in Previous Year", "Chart", "Bar", null, "7", null, "currencyIdSelectOne" ] + }, { + "row" : [ "34", "Loans - Active Loans Portfolio Status", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "34", "Loans - Active Loans Portfolio Status", "Table", null, null, "6", null, "currencyIdSelectAll" ] + }, { + "row" : [ "31", "Loans Awaiting Disbursal", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "35", "Portfolio at Risk", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "35", "Portfolio at Risk", "Table", null, null, "6", null, "currencyIdSelectAll" ] + }, { + "row" : [ "32", "Upcoming Repayments", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "32", "Upcoming Repayments", "Table", null, null, "6", null, "currencyIdSelectAll" ] + }, { + "row" : [ "38", "Upcoming Repayments Summary By Month, Currency and Loan Risk", "Table", null, null, "5", null, "selectOfficeId" ] + }, { + "row" : [ "38", "Upcoming Repayments Summary By Month, Currency and Loan Risk", "Table", null, null, "6", null, "currencyIdSelectAll" ] + } ] +} +
- -  
@@ -2896,6 +2862,9 @@ Request Body:{

Runs a report and returns the report output.

+

+ Note: Pentaho details yet to be provided +

Arguments
R_'parameter names' ...
@@ -2907,63 +2876,90 @@ Request Body:{
Determines whether the request looks in the list of reports or the list of parameters for its data.
exportCSV
optional, The only valid value is 'true'. If any other value is provided the argument will be ignored
-
Output will be delivered as a CSV file instead of JSON. Doesn't apply to Pentaho reports.
+
Output will be delivered as a CSV file instead of JSON. Doesn't apply to Pentaho reports .
-

Example Request: - https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1 -

+

Example Requests:

+ https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1&pretty=true +

+ https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1&pretty=true&exportCSV=true +

+ https://localhost:8443/mifosng-provider/api/v1/reports/selectOfficeId?R_officeId=1&pretty=true& parameterType=true +

+ https://localhost:8443/mifosng-provider/api/v1/reports/selectOfficeId?R_officeId=1&pretty=true& parameterType=true&exportCSV=true
GET https://thedomainname/api/v1/reports/{reportName} { - "columnHeaders": [ - { - "columnName": "Office/Branch", - "columnType": "VARCHAR", - "columnLength": null, - "columnDisplayType": null, - "columnValues": [] - }, - { - "columnName": "Name", - "columnType": "VARCHAR", - "columnLength": null, - "columnDisplayType": null, - "columnValues": [] - }, - { - "columnName": "Joining Date", - "columnType": "DATE", - "columnLength": null, - "columnDisplayType": null, - "columnValues": [] - } - ], - "data": [ - { - "row": [ - "Demo MFI Head Office", - "O'Meara, Patrick", - "2009-01-04" - ] - }, - { - "row": [ - "Demo MFI Head Office", - "O'Meara, Dennis", - "2009-01-04" - ] - }, - { - "row": [ - "Demo MFI Head Office", - "Smith, John", - "2009-01-11" - ] - }, - ... more "row" entries - ] - } + "columnHeaders" : [ { + "columnName" : "Office/Branch", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "Name", + "columnType" : "VARCHAR", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + }, { + "columnName" : "Joining Date", + "columnType" : "DATE", + "columnLength" : null, + "columnDisplayType" : null, + "columnValues" : [ ] + } ], + "data" : [ { + "row" : [ "Demo MFI Head Office", "O'Meara, Patrick", "2009-01-04" ] + }, { + "row" : [ "Demo MFI Head Office", "O'Meara, Dennis", "2009-01-04" ] + }, { + "row" : [ "Demo MFI Head Office", "Smith, John", "2009-01-11" ] + }, { + "row" : [ "Demo MFI Head Office", "O'Meara, Jimmy", "2009-01-11" ] + }, { + "row" : [ "Demo MFI Head Office", "Sunnyville vegetable growers Ltd", "2009-01-24" ] + }, { + "row" : [ "Demo MFI Head Office", "Traoré, Kalilou", "2009-02-04" ] + }, { + "row" : [ "Demo MFI Head Office", "Koné, Sidi", "2009-02-11" ] + }, { + "row" : [ "Demo MFI Head Office", "Yattabaré, Moustapha", "2009-02-18" ] + }, { + "row" : [ "Demo MFI Head Office", "Mali fruit sales ltd.", "2009-02-18" ] + }, { + "row" : [ "Demo MFI Head Office", "Djenne co-op group", "2009-02-25" ] + }, { + "row" : [ "Demo MFI Head Office", "test, test", "2012-04-19" ] + }, { + "row" : [ "Demo MFI Head Office", "Ziffle, Fred", "2012-04-21" ] + }, { + "row" : [ "Demo MFI Head Office", "omara, safik", "2012-04-24" ] + }, { + "row" : [ "Demo MFI Head Office", "HF Test", "2012-04-24" ] + }, { + "row" : [ "Demo MFI Head Office", "HF Test 2", "2012-04-24" ] + }, { + "row" : [ "Demo MFI Head Office", "Kumar, Shiva", "2011-10-01" ] + }, { + "row" : [ "Demo MFI Head Office", "Yton, Petra", "2006-06-09" ] + }, { + "row" : [ "Demo MFI Head Office", "Yton, Petra", "2006-06-09" ] + }, { + "row" : [ "sub branch 1", "Lee, Jacques", "2012-04-03" ] + }, { + "row" : [ "sub branch 1", "Asare-Frimpong, Patrick", "2012-04-18" ] + }, { + "row" : [ "sub branch 2", "t, test", "2012-04-18" ] + }, { + "row" : [ "Majmoua", "client, firstMajmoua", "2011-12-01" ] + }, { + "row" : [ "Intrasoft Technologies", "Said, Zayyad", "2012-04-02" ] + }, { + "row" : [ "Hugo technologies", "typical individual lending client", "2010-06-02" ] + } ] +} +
diff --git a/APIFolder/docUpdateComments.txt b/APIFolder/docUpdateComments.txt index e5163152c..70ed5b3c4 100644 --- a/APIFolder/docUpdateComments.txt +++ b/APIFolder/docUpdateComments.txt @@ -21,6 +21,17 @@ list clients notes - noteType needs a 'text' updating client note - ignores clientId anyhow! so is it really a notes resource? +loan template +Formatted field still there +Type fields rename and with associated text? +allowedProduct should maybe just be id & name +which fields have defaults as not all on NewLoanWorkflowStepOneData dto seem to be default. + + +Additional Fields +put right message for parameter not recognized etc.(plus tht 9 other jpwwrongmsg items) + + Identify Fields that need explaining Clients diff --git a/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java b/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java index 48e080d43..6f09f74df 100644 --- a/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java @@ -369,22 +369,6 @@ public class ReadExtraDataAndReportingServiceImpl implements @Override public GenericResultset retrieveExtraData(String type, String set, Long id) { - if (type == null) { - throw new PlatformDataIntegrityException( - "error.msg.additional.fields.type.null", - "JPWWRONGMSG - Additional Fields Type is null."); - } - if (set == null) { - throw new PlatformDataIntegrityException( - "error.msg.additional.fields.set.null", - "JPWWRONGMSG - Additional Fields Set is null."); - } - if (id == null) { - throw new PlatformDataIntegrityException( - "error.msg.additional.fields.id.null", - "JPWWRONGMSG - Additional Fields Id is null."); - } - long startTime = System.currentTimeMillis(); GenericResultset result = fillExtraDataGenericResultSet(type, set, id); long elapsed = System.currentTimeMillis() - startTime; @@ -428,12 +412,14 @@ public class ReadExtraDataAndReportingServiceImpl implements + rsch.getColumnName() + "`"; rsch.setColumnType(rsmd.getString("data_type")); - rsch.setColumnLength(rsmd.getInt("data_length")); + if (rsmd.getInt("data_length") > 0) + rsch.setColumnLength(rsmd.getInt("data_length")); rsch.setColumnDisplayType(rsmd.getString("display_type")); allowedListId = rsmd.getInt("allowed_list_id"); if (allowedListId > 0) { - //logger.info("allowedListId != null: Column: " + rsch.getColumnName()); + // logger.info("allowedListId != null: Column: " + + // rsch.getColumnName()); sql = "select v.`name` from stretchydata_allowed_value v where allowed_list_id = " + allowedListId + " order by id"; ResultSet rsValues = db_statement2.executeQuery(sql);