public void loadData(boolean forceReload) { ICFFreeSwitchSchemaObj schemaObj = swingSchema.getSchema(); if ((containingCluster == null) || forceReload) { CFSecurityAuthorization auth = schemaObj.getAuthorization(); long containingClusterId = auth.getSecClusterId(); containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId); } if ((listOfTenant == null) || forceReload) { arrayOfTenant = null; listOfTenant = schemaObj .getTenantTableObj() .readTenantByClusterIdx(containingCluster.getRequiredId(), swingIsInitializing); if (listOfTenant != null) { Object objArray[] = listOfTenant.toArray(); if (objArray != null) { int len = objArray.length; arrayOfTenant = new ICFSecurityTenantObj[len]; for (int i = 0; i < len; i++) { arrayOfTenant[i] = (ICFSecurityTenantObj) objArray[i]; } Arrays.sort(arrayOfTenant, compareTenantByQualName); } } } }
public void setSwingDataCollection(Collection<ICFFreeSwitchFSSFProfileAliasObj> value) { final String S_ProcName = "setSwingDataCollection"; swingDataCollection = value; if (swingDataCollection == null) { arrayOfFSSFProfileAlias = new ICFFreeSwitchFSSFProfileAliasObj[0]; } else { int len = value.size(); arrayOfFSSFProfileAlias = new ICFFreeSwitchFSSFProfileAliasObj[len]; Iterator<ICFFreeSwitchFSSFProfileAliasObj> iter = swingDataCollection.iterator(); int idx = 0; while (iter.hasNext() && (idx < len)) { arrayOfFSSFProfileAlias[idx++] = iter.next(); } if (idx < len) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator did not fully populate the array copy"); } if (iter.hasNext()) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator had left over items when done populating array copy"); } Arrays.sort(arrayOfFSSFProfileAlias, compareFSSFProfileAliasByQualName); } PickerTableModel tblDataModel = getDataModel(); if (tblDataModel != null) { tblDataModel.fireTableDataChanged(); } }