Skip to Content
0
Former Member
Nov 15, 2017 at 05:12 PM

How to get the list of objects, tables... with the java SDK

59 Views

Hello everybody

I would like to modify the description of all the BO objects of a universe, but I can not select the objects, with this code, I can only display the list of universes, could someone help me? thank you


ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
enterpriseSession = sessionMgr.logon("Administrator","adminrt1.3", "pcya40gt:6400", "secEnterprise");
reportEngines = (ReportEngines) enterpriseSession.getService("ReportEngines");
ReportEngine wiRepEngine = (ReportEngine) reportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
IInfoStore infoStore = (IInfoStore) enterpriseSession.getService("InfoStore");
String query = "SELECT SI_ID, SI_NAME, SI_DATACONNECTION FROM CI_APPOBJECTS WHERE SI_KIND = 'universe'";
IInfoObjects unvs = (IInfoObjects) infoStore.query(query);

for (Object o : unvs)
{
IUniverse unv = (IUniverse)o;
Set<Integer> conns = unv.getDataConnections();

if (conns.size() != 0)
System.out.println(unv.getTitle());
}