public void loadData(boolean forceReload) { ICFBamSchemaObj schemaObj = swingSchema.getSchema(); if ((containingCluster == null) || forceReload) { CFSecurityAuthorization auth = schemaObj.getAuthorization(); long containingClusterId = auth.getSecClusterId(); containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId); } if ((listOfSysCluster == null) || forceReload) { arrayOfSysCluster = null; listOfSysCluster = schemaObj .getSysClusterTableObj() .readSysClusterByClusterIdx(containingCluster.getRequiredId(), swingIsInitializing); if (listOfSysCluster != null) { Object objArray[] = listOfSysCluster.toArray(); if (objArray != null) { int len = objArray.length; arrayOfSysCluster = new ICFSecuritySysClusterObj[len]; for (int i = 0; i < len; i++) { arrayOfSysCluster[i] = (ICFSecuritySysClusterObj) objArray[i]; } Arrays.sort(arrayOfSysCluster, compareSysClusterByQualName); } } } }
public void setSwingDataCollection(Collection<ICFBamIndexObj> value) { final String S_ProcName = "setSwingDataCollection"; swingDataCollection = value; if (swingDataCollection == null) { arrayOfIndex = new ICFBamIndexObj[0]; } else { int len = value.size(); arrayOfIndex = new ICFBamIndexObj[len]; Iterator<ICFBamIndexObj> iter = swingDataCollection.iterator(); int idx = 0; while (iter.hasNext() && (idx < len)) { arrayOfIndex[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(arrayOfIndex, compareIndexByQualName); } PickerTableModel tblDataModel = getDataModel(); if (tblDataModel != null) { tblDataModel.fireTableDataChanged(); } }