summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java
index 3544fd7c..0b9f9be7 100644
--- a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java
+++ b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java
@@ -171,6 +171,17 @@ public class OnapCommandResult {
this.isDebug = isDebug;
}
+ public int getNumberOfRows() {
+ int noOfRecords = 0;
+
+ for (OnapCommandResultAttribute cols : this.records) {
+ if (cols != null && noOfRecords < cols.getValues().size()) {
+ noOfRecords = cols.getValues().size();
+ }
+ }
+
+ return noOfRecords;
+ }
/**
* Helps to print the result based on the type.
*