001package com.pingidentity.util; 002 003import com.unboundid.ldap.sdk.Entry; 004 005import java.util.ArrayList; 006import java.util.List; 007 008public class MSGraphResult { 009 010 /** 011 * Keep list of entries returned most recently 012 */ 013 public List<Entry> entries = null; 014 015 /** 016 * Next Link 017 */ 018 public String nextLink = null; 019 020 /** 021 * Object Type 022 */ 023 public MSGraphAPI.OBJECT_TYPE objectType = null; 024 025 public MSGraphResult () { 026 this.objectType = null; 027 this.entries = new ArrayList<>(); 028 this.nextLink = null; 029 } 030 031 public MSGraphResult (MSGraphAPI.OBJECT_TYPE objectType, 032 List<Entry> entries, 033 String nextLink) { 034 this.objectType = objectType; 035 this.entries = entries; 036 this.nextLink = nextLink; 037 } 038 039 public int size() { 040 if (entries != null) { 041 return entries.size(); 042 } else { 043 return 0; 044 } 045 } 046 047 /** 048 * 049 * @return 050 */ 051 public boolean hasMoreEntries() { 052 return (nextLink != null); 053 } 054 055 /** 056 * 057 */ 058 public String toString() { 059 return "GraphResult:" + 060 "\n\tnumEntries=" + entries.size() + 061 "\n\t nextLink= " + nextLink; 062 } 063}