Skip to content

Instantly share code, notes, and snippets.

@rickx1
Last active May 19, 2020 18:11
Show Gist options
  • Save rickx1/4f058d77aba372050774b07feeced41d to your computer and use it in GitHub Desktop.
Save rickx1/4f058d77aba372050774b07feeced41d to your computer and use it in GitHub Desktop.
Standard collection support for the FileNet Content Engine Java API. The GenerateCode.java file at the bottom of this gist is used to generate the most part of the CEAPICollections file. See http://ecmdeveloper.com/contentengine/collections-ceapi/ for more details.
package com.ecmdeveloper.jace.collections;
import java.util.Date;
import java.util.Iterator;
import com.filenet.api.admin.*;
import com.filenet.api.events.*;
import com.filenet.api.core.*;
import com.filenet.api.collection.*;
import com.filenet.api.collection.ChoiceList;
import com.filenet.api.sweep.*;
import com.filenet.api.publishing.*;
import com.filenet.api.meta.*;
import com.filenet.api.replication.*;
import com.filenet.api.security.*;
import com.filenet.api.util.*;
import com.filenet.api.query.*;
/**
* This class wraps the collection classes in the <tt>com.filenet.api.collection</tt>
* package into collections which can be processed with Java for-each constructs.
*
* Use it by doing a static import like this:
*
* <pre>
* import static com.ecmdeveloper.jace.collections.CEAPICollections.asCollection;
* </pre>
*
* And use it in your code like this:
*
* <pre>
* Folder folder = Factory.Folder.fetchInstance(os, path, filter);
* for (Document document : asCollection(folder.get_ContainedDocuments()) ) {
* System.out.println(document.get_Name());
* }
* </pre>
*
* @author Ricardo Belfor
*
*/
@SuppressWarnings({"unchecked","deprecation"})
public class CEAPICollections {
/* Start of generated code */
public static Iterable<AccessPermissionDescription> asCollection(final AccessPermissionDescriptionList accessPermissionDescriptionList) {
return new Iterable<AccessPermissionDescription>() {
@Override
public Iterator<AccessPermissionDescription> iterator() {
return accessPermissionDescriptionList.iterator();
}
};
}
public static Iterable<AccessPermission> asCollection(final AccessPermissionList accessPermissionList) {
return new Iterable<AccessPermission>() {
@Override
public Iterator<AccessPermission> iterator() {
return accessPermissionList.iterator();
}
};
}
public static Iterable<ActionConsumer> asCollection(final ActionConsumerSet actionConsumerSet) {
return new Iterable<ActionConsumer>() {
@Override
public Iterator<ActionConsumer> iterator() {
return actionConsumerSet.iterator();
}
};
}
public static Iterable<Action> asCollection(final ActionSet actionSet) {
return new Iterable<Action>() {
@Override
public Iterator<Action> iterator() {
return actionSet.iterator();
}
};
}
public static Iterable<ActiveMarking> asCollection(final ActiveMarkingList activeMarkingList) {
return new Iterable<ActiveMarking>() {
@Override
public Iterator<ActiveMarking> iterator() {
return activeMarkingList.iterator();
}
};
}
public static Iterable<AddOnInstallationRecord> asCollection(final AddOnInstallationRecordList addOnInstallationRecordList) {
return new Iterable<AddOnInstallationRecord>() {
@Override
public Iterator<AddOnInstallationRecord> iterator() {
return addOnInstallationRecordList.iterator();
}
};
}
public static Iterable<AddOn> asCollection(final AddOnSet addOnSet) {
return new Iterable<AddOn>() {
@Override
public Iterator<AddOn> iterator() {
return addOnSet.iterator();
}
};
}
public static Iterable<Annotation> asCollection(final AnnotationSet annotationSet) {
return new Iterable<Annotation>() {
@Override
public Iterator<Annotation> iterator() {
return annotationSet.iterator();
}
};
}
public static Iterable<ApplicationSecurityTemplate> asCollection(final ApplicationSecurityTemplateList applicationSecurityTemplateList) {
return new Iterable<ApplicationSecurityTemplate>() {
@Override
public Iterator<ApplicationSecurityTemplate> iterator() {
return applicationSecurityTemplateList.iterator();
}
};
}
public static Iterable<AsyncProcessingConfiguration> asCollection(final AsyncProcessingConfigurationList asyncProcessingConfigurationList) {
return new Iterable<AsyncProcessingConfiguration>() {
@Override
public Iterator<AsyncProcessingConfiguration> iterator() {
return asyncProcessingConfigurationList.iterator();
}
};
}
public static Iterable<AsyncUpgradeQueueItem> asCollection(final AsyncUpgradeQueueItemSet asyncUpgradeQueueItemSet) {
return new Iterable<AsyncUpgradeQueueItem>() {
@Override
public Iterator<AsyncUpgradeQueueItem> iterator() {
return asyncUpgradeQueueItemSet.iterator();
}
};
}
public static Iterable<AuditConfigurationEvent> asCollection(final AuditConfigurationEventSet auditConfigurationEventSet) {
return new Iterable<AuditConfigurationEvent>() {
@Override
public Iterator<AuditConfigurationEvent> iterator() {
return auditConfigurationEventSet.iterator();
}
};
}
public static Iterable<AuditDefinition> asCollection(final AuditDefinitionList auditDefinitionList) {
return new Iterable<AuditDefinition>() {
@Override
public Iterator<AuditDefinition> iterator() {
return auditDefinitionList.iterator();
}
};
}
public static Iterable<byte[]> asCollection(final BinaryList binaryList) {
return new Iterable<byte[]>() {
@Override
public Iterator<byte[]> iterator() {
return binaryList.iterator();
}
};
}
public static Iterable<Boolean> asCollection(final BooleanList booleanList) {
return new Iterable<Boolean>() {
@Override
public Iterator<Boolean> iterator() {
return booleanList.iterator();
}
};
}
public static Iterable<CFSImportAgentConfiguration> asCollection(final CFSImportAgentConfigurationList cFSImportAgentConfigurationList) {
return new Iterable<CFSImportAgentConfiguration>() {
@Override
public Iterator<CFSImportAgentConfiguration> iterator() {
return cFSImportAgentConfigurationList.iterator();
}
};
}
public static Iterable<CFSSiteSettings> asCollection(final CFSSiteSettingsList cFSSiteSettingsList) {
return new Iterable<CFSSiteSettings>() {
@Override
public Iterator<CFSSiteSettings> iterator() {
return cFSSiteSettingsList.iterator();
}
};
}
public static Iterable<CMODApplicationGroup> asCollection(final CMODApplicationGroupSet cMODApplicationGroupSet) {
return new Iterable<CMODApplicationGroup>() {
@Override
public Iterator<CMODApplicationGroup> iterator() {
return cMODApplicationGroupSet.iterator();
}
};
}
public static Iterable<CMODFixedContentDevice> asCollection(final CMODFixedContentDeviceSet cMODFixedContentDeviceSet) {
return new Iterable<CMODFixedContentDevice>() {
@Override
public Iterator<CMODFixedContentDevice> iterator() {
return cMODFixedContentDeviceSet.iterator();
}
};
}
public static Iterable<CMODRepository> asCollection(final CMODRepositorySet cMODRepositorySet) {
return new Iterable<CMODRepository>() {
@Override
public Iterator<CMODRepository> iterator() {
return cMODRepositorySet.iterator();
}
};
}
public static Iterable<CancelCheckoutEvent> asCollection(final CancelCheckoutEventSet cancelCheckoutEventSet) {
return new Iterable<CancelCheckoutEvent>() {
@Override
public Iterator<CancelCheckoutEvent> iterator() {
return cancelCheckoutEventSet.iterator();
}
};
}
public static Iterable<CenteraFixedContentDevice> asCollection(final CenteraFixedContentDeviceSet centeraFixedContentDeviceSet) {
return new Iterable<CenteraFixedContentDevice>() {
@Override
public Iterator<CenteraFixedContentDevice> iterator() {
return centeraFixedContentDeviceSet.iterator();
}
};
}
public static Iterable<CenteraSiteSettings> asCollection(final CenteraSiteSettingsList centeraSiteSettingsList) {
return new Iterable<CenteraSiteSettings>() {
@Override
public Iterator<CenteraSiteSettings> iterator() {
return centeraSiteSettingsList.iterator();
}
};
}
public static Iterable<ChangeClassEvent> asCollection(final ChangeClassEventSet changeClassEventSet) {
return new Iterable<ChangeClassEvent>() {
@Override
public Iterator<ChangeClassEvent> iterator() {
return changeClassEventSet.iterator();
}
};
}
public static Iterable<ChangeStateEvent> asCollection(final ChangeStateEventSet changeStateEventSet) {
return new Iterable<ChangeStateEvent>() {
@Override
public Iterator<ChangeStateEvent> iterator() {
return changeStateEventSet.iterator();
}
};
}
public static Iterable<CheckinEvent> asCollection(final CheckinEventSet checkinEventSet) {
return new Iterable<CheckinEvent>() {
@Override
public Iterator<CheckinEvent> iterator() {
return checkinEventSet.iterator();
}
};
}
public static Iterable<CheckoutEvent> asCollection(final CheckoutEventSet checkoutEventSet) {
return new Iterable<CheckoutEvent>() {
@Override
public Iterator<CheckoutEvent> iterator() {
return checkoutEventSet.iterator();
}
};
}
public static Iterable<Choice> asCollection(final ChoiceList choiceList) {
return new Iterable<Choice>() {
@Override
public Iterator<Choice> iterator() {
return choiceList.iterator();
}
};
}
public static Iterable<Choice> asCollection(final ChoiceListSet choiceListSet) {
return new Iterable<Choice>() {
@Override
public Iterator<Choice> iterator() {
return choiceListSet.iterator();
}
};
}
public static Iterable<ClassDefinition> asCollection(final ClassDefinitionSet classDefinitionSet) {
return new Iterable<ClassDefinition>() {
@Override
public Iterator<ClassDefinition> iterator() {
return classDefinitionSet.iterator();
}
};
}
public static Iterable<ClassDescription> asCollection(final ClassDescriptionSet classDescriptionSet) {
return new Iterable<ClassDescription>() {
@Override
public Iterator<ClassDescription> iterator() {
return classDescriptionSet.iterator();
}
};
}
public static Iterable<ClassSubscription> asCollection(final ClassSubscriptionSet classSubscriptionSet) {
return new Iterable<ClassSubscription>() {
@Override
public Iterator<ClassSubscription> iterator() {
return classSubscriptionSet.iterator();
}
};
}
public static Iterable<ClassWorkflowSubscription> asCollection(final ClassWorkflowSubscriptionSet classWorkflowSubscriptionSet) {
return new Iterable<ClassWorkflowSubscription>() {
@Override
public Iterator<ClassWorkflowSubscription> iterator() {
return classWorkflowSubscriptionSet.iterator();
}
};
}
public static Iterable<ClassifyCompleteEvent> asCollection(final ClassifyCompleteEventSet classifyCompleteEventSet) {
return new Iterable<ClassifyCompleteEvent>() {
@Override
public Iterator<ClassifyCompleteEvent> iterator() {
return classifyCompleteEventSet.iterator();
}
};
}
public static Iterable<CmAbstractDependent> asCollection(final CmAbstractDependentList cmAbstractDependentList) {
return new Iterable<CmAbstractDependent>() {
@Override
public Iterator<CmAbstractDependent> iterator() {
return cmAbstractDependentList.iterator();
}
};
}
public static Iterable<CmAbstractPermission> asCollection(final CmAbstractPermissionList cmAbstractPermissionList) {
return new Iterable<CmAbstractPermission>() {
@Override
public Iterator<CmAbstractPermission> iterator() {
return cmAbstractPermissionList.iterator();
}
};
}
public static Iterable<CmAbstractSearchResult> asCollection(final CmAbstractSearchResultSet cmAbstractSearchResultSet) {
return new Iterable<CmAbstractSearchResult>() {
@Override
public Iterator<CmAbstractSearchResult> iterator() {
return cmAbstractSearchResultSet.iterator();
}
};
}
public static Iterable<CmAdvancedStorageArea> asCollection(final CmAdvancedStorageAreaSet cmAdvancedStorageAreaSet) {
return new Iterable<CmAdvancedStorageArea>() {
@Override
public Iterator<CmAdvancedStorageArea> iterator() {
return cmAdvancedStorageAreaSet.iterator();
}
};
}
public static Iterable<CmAuditDispositionPolicy> asCollection(final CmAuditDispositionPolicySet cmAuditDispositionPolicySet) {
return new Iterable<CmAuditDispositionPolicy>() {
@Override
public Iterator<CmAuditDispositionPolicy> iterator() {
return cmAuditDispositionPolicySet.iterator();
}
};
}
public static Iterable<CmAuditProcessingBookmark> asCollection(final CmAuditProcessingBookmarkSet cmAuditProcessingBookmarkSet) {
return new Iterable<CmAuditProcessingBookmark>() {
@Override
public Iterator<CmAuditProcessingBookmark> iterator() {
return cmAuditProcessingBookmarkSet.iterator();
}
};
}
public static Iterable<CmBackgroundSearch> asCollection(final CmBackgroundSearchSet cmBackgroundSearchSet) {
return new Iterable<CmBackgroundSearch>() {
@Override
public Iterator<CmBackgroundSearch> iterator() {
return cmBackgroundSearchSet.iterator();
}
};
}
public static Iterable<CmChangePreprocessorAction> asCollection(final CmChangePreprocessorActionSet cmChangePreprocessorActionSet) {
return new Iterable<CmChangePreprocessorAction>() {
@Override
public Iterator<CmChangePreprocessorAction> iterator() {
return cmChangePreprocessorActionSet.iterator();
}
};
}
public static Iterable<CmChangePreprocessorDefinition> asCollection(final CmChangePreprocessorDefinitionList cmChangePreprocessorDefinitionList) {
return new Iterable<CmChangePreprocessorDefinition>() {
@Override
public Iterator<CmChangePreprocessorDefinition> iterator() {
return cmChangePreprocessorDefinitionList.iterator();
}
};
}
public static Iterable<CmConversionSettingsClassDefinition> asCollection(final CmConversionSettingsClassDefinitionSet cmConversionSettingsClassDefinitionSet) {
return new Iterable<CmConversionSettingsClassDefinition>() {
@Override
public Iterator<CmConversionSettingsClassDefinition> iterator() {
return cmConversionSettingsClassDefinitionSet.iterator();
}
};
}
public static Iterable<CmDatabaseConnection> asCollection(final CmDatabaseConnectionSet cmDatabaseConnectionSet) {
return new Iterable<CmDatabaseConnection>() {
@Override
public Iterator<CmDatabaseConnection> iterator() {
return cmDatabaseConnectionSet.iterator();
}
};
}
public static Iterable<CmDirectoryConfigurationOID> asCollection(final CmDirectoryConfigurationOIDList cmDirectoryConfigurationOIDList) {
return new Iterable<CmDirectoryConfigurationOID>() {
@Override
public Iterator<CmDirectoryConfigurationOID> iterator() {
return cmDirectoryConfigurationOIDList.iterator();
}
};
}
public static Iterable<CmEventExportStore> asCollection(final CmEventExportStoreSet cmEventExportStoreSet) {
return new Iterable<CmEventExportStore>() {
@Override
public Iterator<CmEventExportStore> iterator() {
return cmEventExportStoreSet.iterator();
}
};
}
public static Iterable<CmHoldRelationship> asCollection(final CmHoldRelationshipSet cmHoldRelationshipSet) {
return new Iterable<CmHoldRelationship>() {
@Override
public Iterator<CmHoldRelationship> iterator() {
return cmHoldRelationshipSet.iterator();
}
};
}
public static Iterable<CmHoldable> asCollection(final CmHoldableSet cmHoldableSet) {
return new Iterable<CmHoldable>() {
@Override
public Iterator<CmHoldable> iterator() {
return cmHoldableSet.iterator();
}
};
}
public static Iterable<CmIndexDefinition> asCollection(final CmIndexDefinitionList cmIndexDefinitionList) {
return new Iterable<CmIndexDefinition>() {
@Override
public Iterator<CmIndexDefinition> iterator() {
return cmIndexDefinitionList.iterator();
}
};
}
public static Iterable<CmIndexPartitionConstraint> asCollection(final CmIndexPartitionConstraintList cmIndexPartitionConstraintList) {
return new Iterable<CmIndexPartitionConstraint>() {
@Override
public Iterator<CmIndexPartitionConstraint> iterator() {
return cmIndexPartitionConstraintList.iterator();
}
};
}
public static Iterable<CmIndexRequest> asCollection(final CmIndexRequestSet cmIndexRequestSet) {
return new Iterable<CmIndexRequest>() {
@Override
public Iterator<CmIndexRequest> iterator() {
return cmIndexRequestSet.iterator();
}
};
}
public static Iterable<CmIndexedColumn> asCollection(final CmIndexedColumnList cmIndexedColumnList) {
return new Iterable<CmIndexedColumn>() {
@Override
public Iterator<CmIndexedColumn> iterator() {
return cmIndexedColumnList.iterator();
}
};
}
public static Iterable<CmJobSweepResult> asCollection(final CmJobSweepResultSet cmJobSweepResultSet) {
return new Iterable<CmJobSweepResult>() {
@Override
public Iterator<CmJobSweepResult> iterator() {
return cmJobSweepResultSet.iterator();
}
};
}
public static Iterable<CmPolicyControlledSweep> asCollection(final CmPolicyControlledSweepSet cmPolicyControlledSweepSet) {
return new Iterable<CmPolicyControlledSweep>() {
@Override
public Iterator<CmPolicyControlledSweep> iterator() {
return cmPolicyControlledSweepSet.iterator();
}
};
}
public static Iterable<CmPolicySweepResult> asCollection(final CmPolicySweepResultSet cmPolicySweepResultSet) {
return new Iterable<CmPolicySweepResult>() {
@Override
public Iterator<CmPolicySweepResult> iterator() {
return cmPolicySweepResultSet.iterator();
}
};
}
public static Iterable<CmQueueSweep> asCollection(final CmQueueSweepSet cmQueueSweepSet) {
return new Iterable<CmQueueSweep>() {
@Override
public Iterator<CmQueueSweep> iterator() {
return cmQueueSweepSet.iterator();
}
};
}
public static Iterable<CmRecoveryItem> asCollection(final CmRecoveryItemSet cmRecoveryItemSet) {
return new Iterable<CmRecoveryItem>() {
@Override
public Iterator<CmRecoveryItem> iterator() {
return cmRecoveryItemSet.iterator();
}
};
}
public static Iterable<CmReplicaSynchronizationSiteSettings> asCollection(final CmReplicaSynchronizationSiteSettingsList cmReplicaSynchronizationSiteSettingsList) {
return new Iterable<CmReplicaSynchronizationSiteSettings>() {
@Override
public Iterator<CmReplicaSynchronizationSiteSettings> iterator() {
return cmReplicaSynchronizationSiteSettingsList.iterator();
}
};
}
public static Iterable<CmRoleAccessDefinition> asCollection(final CmRoleAccessDefinitionList cmRoleAccessDefinitionList) {
return new Iterable<CmRoleAccessDefinition>() {
@Override
public Iterator<CmRoleAccessDefinition> iterator() {
return cmRoleAccessDefinitionList.iterator();
}
};
}
public static Iterable<CmRoleClassDefinition> asCollection(final CmRoleClassDefinitionSet cmRoleClassDefinitionSet) {
return new Iterable<CmRoleClassDefinition>() {
@Override
public Iterator<CmRoleClassDefinition> iterator() {
return cmRoleClassDefinitionSet.iterator();
}
};
}
public static Iterable<CmRoleMember> asCollection(final CmRoleMemberList cmRoleMemberList) {
return new Iterable<CmRoleMember>() {
@Override
public Iterator<CmRoleMember> iterator() {
return cmRoleMemberList.iterator();
}
};
}
public static Iterable<CmStorageDeviceConnection> asCollection(final CmStorageDeviceConnectionList cmStorageDeviceConnectionList) {
return new Iterable<CmStorageDeviceConnection>() {
@Override
public Iterator<CmStorageDeviceConnection> iterator() {
return cmStorageDeviceConnectionList.iterator();
}
};
}
public static Iterable<CmSweepJob> asCollection(final CmSweepJobSet cmSweepJobSet) {
return new Iterable<CmSweepJob>() {
@Override
public Iterator<CmSweepJob> iterator() {
return cmSweepJobSet.iterator();
}
};
}
public static Iterable<CmSweepPolicyRelationship> asCollection(final CmSweepPolicyRelationshipSet cmSweepPolicyRelationshipSet) {
return new Iterable<CmSweepPolicyRelationship>() {
@Override
public Iterator<CmSweepPolicyRelationship> iterator() {
return cmSweepPolicyRelationshipSet.iterator();
}
};
}
public static Iterable<CmSweepPolicy> asCollection(final CmSweepPolicySet cmSweepPolicySet) {
return new Iterable<CmSweepPolicy>() {
@Override
public Iterator<CmSweepPolicy> iterator() {
return cmSweepPolicySet.iterator();
}
};
}
public static Iterable<CmSweepRelationship> asCollection(final CmSweepRelationshipSet cmSweepRelationshipSet) {
return new Iterable<CmSweepRelationship>() {
@Override
public Iterator<CmSweepRelationship> iterator() {
return cmSweepRelationshipSet.iterator();
}
};
}
public static Iterable<CmSweepResult> asCollection(final CmSweepResultSet cmSweepResultSet) {
return new Iterable<CmSweepResult>() {
@Override
public Iterator<CmSweepResult> iterator() {
return cmSweepResultSet.iterator();
}
};
}
public static Iterable<CmSweep> asCollection(final CmSweepSet cmSweepSet) {
return new Iterable<CmSweep>() {
@Override
public Iterator<CmSweep> iterator() {
return cmSweepSet.iterator();
}
};
}
public static Iterable<CmTaskRelationship> asCollection(final CmTaskRelationshipSet cmTaskRelationshipSet) {
return new Iterable<CmTaskRelationship>() {
@Override
public Iterator<CmTaskRelationship> iterator() {
return cmTaskRelationshipSet.iterator();
}
};
}
public static Iterable<CmTask> asCollection(final CmTaskSet cmTaskSet) {
return new Iterable<CmTask>() {
@Override
public Iterator<CmTask> iterator() {
return cmTaskSet.iterator();
}
};
}
public static Iterable<CmTextIndexingPreprocessorDefinition> asCollection(final CmTextIndexingPreprocessorDefinitionList cmTextIndexingPreprocessorDefinitionList) {
return new Iterable<CmTextIndexingPreprocessorDefinition>() {
@Override
public Iterator<CmTextIndexingPreprocessorDefinition> iterator() {
return cmTextIndexingPreprocessorDefinitionList.iterator();
}
};
}
public static Iterable<CmTextSearchAffinityGroup> asCollection(final CmTextSearchAffinityGroupSet cmTextSearchAffinityGroupSet) {
return new Iterable<CmTextSearchAffinityGroup>() {
@Override
public Iterator<CmTextSearchAffinityGroup> iterator() {
return cmTextSearchAffinityGroupSet.iterator();
}
};
}
public static Iterable<CmTextSearchIndex> asCollection(final CmTextSearchIndexList cmTextSearchIndexList) {
return new Iterable<CmTextSearchIndex>() {
@Override
public Iterator<CmTextSearchIndex> iterator() {
return cmTextSearchIndexList.iterator();
}
};
}
public static Iterable<CmTextSearchPartitionProperty> asCollection(final CmTextSearchPartitionPropertyList cmTextSearchPartitionPropertyList) {
return new Iterable<CmTextSearchPartitionProperty>() {
@Override
public Iterator<CmTextSearchPartitionProperty> iterator() {
return cmTextSearchPartitionPropertyList.iterator();
}
};
}
public static Iterable<CmTextSearchServer> asCollection(final CmTextSearchServerSet cmTextSearchServerSet) {
return new Iterable<CmTextSearchServer>() {
@Override
public Iterator<CmTextSearchServer> iterator() {
return cmTextSearchServerSet.iterator();
}
};
}
public static Iterable<CmThumbnail> asCollection(final CmThumbnailSet cmThumbnailSet) {
return new Iterable<CmThumbnail>() {
@Override
public Iterator<CmThumbnail> iterator() {
return cmThumbnailSet.iterator();
}
};
}
public static Iterable<CmTimeslot> asCollection(final CmTimeslotList cmTimeslotList) {
return new Iterable<CmTimeslot>() {
@Override
public Iterator<CmTimeslot> iterator() {
return cmTimeslotList.iterator();
}
};
}
public static Iterable<CmTivoliManagementClass> asCollection(final CmTivoliManagementClassSet cmTivoliManagementClassSet) {
return new Iterable<CmTivoliManagementClass>() {
@Override
public Iterator<CmTivoliManagementClass> iterator() {
return cmTivoliManagementClassSet.iterator();
}
};
}
public static Iterable<CodeModule> asCollection(final CodeModuleSet codeModuleSet) {
return new Iterable<CodeModule>() {
@Override
public Iterator<CodeModule> iterator() {
return codeModuleSet.iterator();
}
};
}
public static Iterable<ColumnDefinition> asCollection(final ColumnDefinitionList columnDefinitionList) {
return new Iterable<ColumnDefinition>() {
@Override
public Iterator<ColumnDefinition> iterator() {
return columnDefinitionList.iterator();
}
};
}
public static Iterable<ComponentRelationship> asCollection(final ComponentRelationshipSet componentRelationshipSet) {
return new Iterable<ComponentRelationship>() {
@Override
public Iterator<ComponentRelationship> iterator() {
return componentRelationshipSet.iterator();
}
};
}
public static Iterable<Containable> asCollection(final ContainableSet containableSet) {
return new Iterable<Containable>() {
@Override
public Iterator<Containable> iterator() {
return containableSet.iterator();
}
};
}
public static Iterable<ContainmentRelationship> asCollection(final ContainmentRelationshipSet containmentRelationshipSet) {
return new Iterable<ContainmentRelationship>() {
@Override
public Iterator<ContainmentRelationship> iterator() {
return containmentRelationshipSet.iterator();
}
};
}
public static Iterable<ContentCacheArea> asCollection(final ContentCacheAreaSet contentCacheAreaSet) {
return new Iterable<ContentCacheArea>() {
@Override
public Iterator<ContentCacheArea> iterator() {
return contentCacheAreaSet.iterator();
}
};
}
public static Iterable<ContentCacheConfiguration> asCollection(final ContentCacheConfigurationList contentCacheConfigurationList) {
return new Iterable<ContentCacheConfiguration>() {
@Override
public Iterator<ContentCacheConfiguration> iterator() {
return contentCacheConfigurationList.iterator();
}
};
}
public static Iterable<ContentConfiguration> asCollection(final ContentConfigurationList contentConfigurationList) {
return new Iterable<ContentConfiguration>() {
@Override
public Iterator<ContentConfiguration> iterator() {
return contentConfigurationList.iterator();
}
};
}
public static Iterable<ContentElement> asCollection(final ContentElementList contentElementList) {
return new Iterable<ContentElement>() {
@Override
public Iterator<ContentElement> iterator() {
return contentElementList.iterator();
}
};
}
public static Iterable<ContentFederatingRepository> asCollection(final ContentFederatingRepositorySet contentFederatingRepositorySet) {
return new Iterable<ContentFederatingRepository>() {
@Override
public Iterator<ContentFederatingRepository> iterator() {
return contentFederatingRepositorySet.iterator();
}
};
}
public static Iterable<ContentReference> asCollection(final ContentReferenceList contentReferenceList) {
return new Iterable<ContentReference>() {
@Override
public Iterator<ContentReference> iterator() {
return contentReferenceList.iterator();
}
};
}
public static Iterable<ContentTransfer> asCollection(final ContentTransferList contentTransferList) {
return new Iterable<ContentTransfer>() {
@Override
public Iterator<ContentTransfer> iterator() {
return contentTransferList.iterator();
}
};
}
public static Iterable<CreationEvent> asCollection(final CreationEventSet creationEventSet) {
return new Iterable<CreationEvent>() {
@Override
public Iterator<CreationEvent> iterator() {
return creationEventSet.iterator();
}
};
}
public static Iterable<CustomEvent> asCollection(final CustomEventSet customEventSet) {
return new Iterable<CustomEvent>() {
@Override
public Iterator<CustomEvent> iterator() {
return customEventSet.iterator();
}
};
}
public static Iterable<CustomObject> asCollection(final CustomObjectSet customObjectSet) {
return new Iterable<CustomObject>() {
@Override
public Iterator<CustomObject> iterator() {
return customObjectSet.iterator();
}
};
}
public static Iterable<DITARenditionEngineConnection> asCollection(final DITARenditionEngineConnectionSet dITARenditionEngineConnectionSet) {
return new Iterable<DITARenditionEngineConnection>() {
@Override
public Iterator<DITARenditionEngineConnection> iterator() {
return dITARenditionEngineConnectionSet.iterator();
}
};
}
public static Iterable<DatabaseStorageArea> asCollection(final DatabaseStorageAreaSet databaseStorageAreaSet) {
return new Iterable<DatabaseStorageArea>() {
@Override
public Iterator<DatabaseStorageArea> iterator() {
return databaseStorageAreaSet.iterator();
}
};
}
public static Iterable<Date> asCollection(final DateTimeList dateTimeList) {
return new Iterable<Date>() {
@Override
public Iterator<Date> iterator() {
return dateTimeList.iterator();
}
};
}
public static Iterable<DeletionEvent> asCollection(final DeletionEventSet deletionEventSet) {
return new Iterable<DeletionEvent>() {
@Override
public Iterator<DeletionEvent> iterator() {
return deletionEventSet.iterator();
}
};
}
public static Iterable<DemoteVersionEvent> asCollection(final DemoteVersionEventSet demoteVersionEventSet) {
return new Iterable<DemoteVersionEvent>() {
@Override
public Iterator<DemoteVersionEvent> iterator() {
return demoteVersionEventSet.iterator();
}
};
}
public static Iterable<DependentObject> asCollection(final DependentObjectList dependentObjectList) {
return new Iterable<DependentObject>() {
@Override
public Iterator<DependentObject> iterator() {
return dependentObjectList.iterator();
}
};
}
public static Iterable<DirectoryConfigurationAD> asCollection(final DirectoryConfigurationADList directoryConfigurationADList) {
return new Iterable<DirectoryConfigurationAD>() {
@Override
public Iterator<DirectoryConfigurationAD> iterator() {
return directoryConfigurationADList.iterator();
}
};
}
public static Iterable<DirectoryConfigurationAdam> asCollection(final DirectoryConfigurationAdamList directoryConfigurationAdamList) {
return new Iterable<DirectoryConfigurationAdam>() {
@Override
public Iterator<DirectoryConfigurationAdam> iterator() {
return directoryConfigurationAdamList.iterator();
}
};
}
public static Iterable<DirectoryConfigurationCA> asCollection(final DirectoryConfigurationCAList directoryConfigurationCAList) {
return new Iterable<DirectoryConfigurationCA>() {
@Override
public Iterator<DirectoryConfigurationCA> iterator() {
return directoryConfigurationCAList.iterator();
}
};
}
public static Iterable<DirectoryConfigurationIBM> asCollection(final DirectoryConfigurationIBMList directoryConfigurationIBMList) {
return new Iterable<DirectoryConfigurationIBM>() {
@Override
public Iterator<DirectoryConfigurationIBM> iterator() {
return directoryConfigurationIBMList.iterator();
}
};
}
public static Iterable<DirectoryConfiguration> asCollection(final DirectoryConfigurationList directoryConfigurationList) {
return new Iterable<DirectoryConfiguration>() {
@Override
public Iterator<DirectoryConfiguration> iterator() {
return directoryConfigurationList.iterator();
}
};
}
public static Iterable<DirectoryConfigurationNovell> asCollection(final DirectoryConfigurationNovellList directoryConfigurationNovellList) {
return new Iterable<DirectoryConfigurationNovell>() {
@Override
public Iterator<DirectoryConfigurationNovell> iterator() {
return directoryConfigurationNovellList.iterator();
}
};
}
public static Iterable<DirectoryConfigurationSunOne> asCollection(final DirectoryConfigurationSunOneList directoryConfigurationSunOneList) {
return new Iterable<DirectoryConfigurationSunOne>() {
@Override
public Iterator<DirectoryConfigurationSunOne> iterator() {
return directoryConfigurationSunOneList.iterator();
}
};
}
public static Iterable<DiscretionaryPermission> asCollection(final DiscretionaryPermissionList discretionaryPermissionList) {
return new Iterable<DiscretionaryPermission>() {
@Override
public Iterator<DiscretionaryPermission> iterator() {
return discretionaryPermissionList.iterator();
}
};
}
public static Iterable<DocumentClassDefinition> asCollection(final DocumentClassDefinitionSet documentClassDefinitionSet) {
return new Iterable<DocumentClassDefinition>() {
@Override
public Iterator<DocumentClassDefinition> iterator() {
return documentClassDefinitionSet.iterator();
}
};
}
public static Iterable<DocumentClassificationAction> asCollection(final DocumentClassificationActionSet documentClassificationActionSet) {
return new Iterable<DocumentClassificationAction>() {
@Override
public Iterator<DocumentClassificationAction> iterator() {
return documentClassificationActionSet.iterator();
}
};
}
public static Iterable<DocumentClassificationQueueItem> asCollection(final DocumentClassificationQueueItemSet documentClassificationQueueItemSet) {
return new Iterable<DocumentClassificationQueueItem>() {
@Override
public Iterator<DocumentClassificationQueueItem> iterator() {
return documentClassificationQueueItemSet.iterator();
}
};
}
public static Iterable<DocumentLifecycleAction> asCollection(final DocumentLifecycleActionSet documentLifecycleActionSet) {
return new Iterable<DocumentLifecycleAction>() {
@Override
public Iterator<DocumentLifecycleAction> iterator() {
return documentLifecycleActionSet.iterator();
}
};
}
public static Iterable<DocumentLifecyclePolicy> asCollection(final DocumentLifecyclePolicySet documentLifecyclePolicySet) {
return new Iterable<DocumentLifecyclePolicy>() {
@Override
public Iterator<DocumentLifecyclePolicy> iterator() {
return documentLifecyclePolicySet.iterator();
}
};
}
public static Iterable<Document> asCollection(final DocumentSet documentSet) {
return new Iterable<Document>() {
@Override
public Iterator<Document> iterator() {
return documentSet.iterator();
}
};
}
public static Iterable<DocumentState> asCollection(final DocumentStateList documentStateList) {
return new Iterable<DocumentState>() {
@Override
public Iterator<DocumentState> iterator() {
return documentStateList.iterator();
}
};
}
public static Iterable<Domain> asCollection(final DomainSet domainSet) {
return new Iterable<Domain>() {
@Override
public Iterator<Domain> iterator() {
return domainSet.iterator();
}
};
}
public static Iterable<DynamicReferentialContainmentRelationship> asCollection(final DynamicReferentialContainmentRelationshipSet dynamicReferentialContainmentRelationshipSet) {
return new Iterable<DynamicReferentialContainmentRelationship>() {
@Override
public Iterator<DynamicReferentialContainmentRelationship> iterator() {
return dynamicReferentialContainmentRelationshipSet.iterator();
}
};
}
public static Iterable<EngineCollection> asCollection(final EngineCollection engineCollection) {
return new Iterable<EngineCollection>() {
@Override
public Iterator<EngineCollection> iterator() {
return engineCollection.iterator();
}
};
}
public static Iterable<EventAction> asCollection(final EventActionSet eventActionSet) {
return new Iterable<EventAction>() {
@Override
public Iterator<EventAction> iterator() {
return eventActionSet.iterator();
}
};
}
public static Iterable<EventClassDefinition> asCollection(final EventClassDefinitionSet eventClassDefinitionSet) {
return new Iterable<EventClassDefinition>() {
@Override
public Iterator<EventClassDefinition> iterator() {
return eventClassDefinitionSet.iterator();
}
};
}
public static Iterable<EventQueueItem> asCollection(final EventQueueItemSet eventQueueItemSet) {
return new Iterable<EventQueueItem>() {
@Override
public Iterator<EventQueueItem> iterator() {
return eventQueueItemSet.iterator();
}
};
}
public static Iterable<Event> asCollection(final EventSet eventSet) {
return new Iterable<Event>() {
@Override
public Iterator<Event> iterator() {
return eventSet.iterator();
}
};
}
public static Iterable<ExternalAlias> asCollection(final ExternalAliasList externalAliasList) {
return new Iterable<ExternalAlias>() {
@Override
public Iterator<ExternalAlias> iterator() {
return externalAliasList.iterator();
}
};
}
public static Iterable<ExternalClassAlias> asCollection(final ExternalClassAliasList externalClassAliasList) {
return new Iterable<ExternalClassAlias>() {
@Override
public Iterator<ExternalClassAlias> iterator() {
return externalClassAliasList.iterator();
}
};
}
public static Iterable<ExternalClassDescription> asCollection(final ExternalClassDescriptionSet externalClassDescriptionSet) {
return new Iterable<ExternalClassDescription>() {
@Override
public Iterator<ExternalClassDescription> iterator() {
return externalClassDescriptionSet.iterator();
}
};
}
public static Iterable<ExternalIdentity> asCollection(final ExternalIdentityList externalIdentityList) {
return new Iterable<ExternalIdentity>() {
@Override
public Iterator<ExternalIdentity> iterator() {
return externalIdentityList.iterator();
}
};
}
public static Iterable<ExternalParticipant> asCollection(final ExternalParticipantList externalParticipantList) {
return new Iterable<ExternalParticipant>() {
@Override
public Iterator<ExternalParticipant> iterator() {
return externalParticipantList.iterator();
}
};
}
public static Iterable<ExternalPropertyAlias> asCollection(final ExternalPropertyAliasList externalPropertyAliasList) {
return new Iterable<ExternalPropertyAlias>() {
@Override
public Iterator<ExternalPropertyAlias> iterator() {
return externalPropertyAliasList.iterator();
}
};
}
public static Iterable<ExternalPropertyDescription> asCollection(final ExternalPropertyDescriptionList externalPropertyDescriptionList) {
return new Iterable<ExternalPropertyDescription>() {
@Override
public Iterator<ExternalPropertyDescription> iterator() {
return externalPropertyDescriptionList.iterator();
}
};
}
public static Iterable<ExternalRepository> asCollection(final ExternalRepositorySet externalRepositorySet) {
return new Iterable<ExternalRepository>() {
@Override
public Iterator<ExternalRepository> iterator() {
return externalRepositorySet.iterator();
}
};
}
public static Iterable<FileEvent> asCollection(final FileEventSet fileEventSet) {
return new Iterable<FileEvent>() {
@Override
public Iterator<FileEvent> iterator() {
return fileEventSet.iterator();
}
};
}
public static Iterable<FileStorageArea> asCollection(final FileStorageAreaSet fileStorageAreaSet) {
return new Iterable<FileStorageArea>() {
@Override
public Iterator<FileStorageArea> iterator() {
return fileStorageAreaSet.iterator();
}
};
}
public static Iterable<FixedContentDevice> asCollection(final FixedContentDeviceSet fixedContentDeviceSet) {
return new Iterable<FixedContentDevice>() {
@Override
public Iterator<FixedContentDevice> iterator() {
return fixedContentDeviceSet.iterator();
}
};
}
public static Iterable<FixedStorageArea> asCollection(final FixedStorageAreaSet fixedStorageAreaSet) {
return new Iterable<FixedStorageArea>() {
@Override
public Iterator<FixedStorageArea> iterator() {
return fixedStorageAreaSet.iterator();
}
};
}
public static Iterable<Double> asCollection(final Float64List float64List) {
return new Iterable<Double>() {
@Override
public Iterator<Double> iterator() {
return float64List.iterator();
}
};
}
public static Iterable<Folder> asCollection(final FolderSet folderSet) {
return new Iterable<Folder>() {
@Override
public Iterator<Folder> iterator() {
return folderSet.iterator();
}
};
}
public static Iterable<FreezeEvent> asCollection(final FreezeEventSet freezeEventSet) {
return new Iterable<FreezeEvent>() {
@Override
public Iterator<FreezeEvent> iterator() {
return freezeEventSet.iterator();
}
};
}
public static Iterable<GenericFixedContentDevice> asCollection(final GenericFixedContentDeviceSet genericFixedContentDeviceSet) {
return new Iterable<GenericFixedContentDevice>() {
@Override
public Iterator<GenericFixedContentDevice> iterator() {
return genericFixedContentDeviceSet.iterator();
}
};
}
public static Iterable<GetContentEvent> asCollection(final GetContentEventSet getContentEventSet) {
return new Iterable<GetContentEvent>() {
@Override
public Iterator<GetContentEvent> iterator() {
return getContentEventSet.iterator();
}
};
}
public static Iterable<GetObjectEvent> asCollection(final GetObjectEventSet getObjectEventSet) {
return new Iterable<GetObjectEvent>() {
@Override
public Iterator<GetObjectEvent> iterator() {
return getObjectEventSet.iterator();
}
};
}
public static Iterable<Group> asCollection(final GroupSet groupSet) {
return new Iterable<Group>() {
@Override
public Iterator<Group> iterator() {
return groupSet.iterator();
}
};
}
public static Iterable<IICEFixedContentDevice> asCollection(final IICEFixedContentDeviceSet iICEFixedContentDeviceSet) {
return new Iterable<IICEFixedContentDevice>() {
@Override
public Iterator<IICEFixedContentDevice> iterator() {
return iICEFixedContentDeviceSet.iterator();
}
};
}
public static Iterable<IMFixedContentDevice> asCollection(final IMFixedContentDeviceSet iMFixedContentDeviceSet) {
return new Iterable<IMFixedContentDevice>() {
@Override
public Iterator<IMFixedContentDevice> iterator() {
return iMFixedContentDeviceSet.iterator();
}
};
}
public static Iterable<Id> asCollection(final IdList idList) {
return new Iterable<Id>() {
@Override
public Iterator<Id> iterator() {
return idList.iterator();
}
};
}
public static Iterable<ImageServicesClassDescription> asCollection(final ImageServicesClassDescriptionList imageServicesClassDescriptionList) {
return new Iterable<ImageServicesClassDescription>() {
@Override
public Iterator<ImageServicesClassDescription> iterator() {
return imageServicesClassDescriptionList.iterator();
}
};
}
public static Iterable<ImageServicesImportAgentConfiguration> asCollection(final ImageServicesImportAgentConfigurationList imageServicesImportAgentConfigurationList) {
return new Iterable<ImageServicesImportAgentConfiguration>() {
@Override
public Iterator<ImageServicesImportAgentConfiguration> iterator() {
return imageServicesImportAgentConfigurationList.iterator();
}
};
}
public static Iterable<ImageServicesPropertyDescription> asCollection(final ImageServicesPropertyDescriptionList imageServicesPropertyDescriptionList) {
return new Iterable<ImageServicesPropertyDescription>() {
@Override
public Iterator<ImageServicesPropertyDescription> iterator() {
return imageServicesPropertyDescriptionList.iterator();
}
};
}
public static Iterable<ImageServicesRepository> asCollection(final ImageServicesRepositorySet imageServicesRepositorySet) {
return new Iterable<ImageServicesRepository>() {
@Override
public Iterator<ImageServicesRepository> iterator() {
return imageServicesRepositorySet.iterator();
}
};
}
public static Iterable<ImageServicesSiteSettings> asCollection(final ImageServicesSiteSettingsList imageServicesSiteSettingsList) {
return new Iterable<ImageServicesSiteSettings>() {
@Override
public Iterator<ImageServicesSiteSettings> iterator() {
return imageServicesSiteSettingsList.iterator();
}
};
}
public static Iterable<IndependentObject> asCollection(final IndependentObjectSet independentObjectSet) {
return new Iterable<IndependentObject>() {
@Override
public Iterator<IndependentObject> iterator() {
return independentObjectSet.iterator();
}
};
}
public static Iterable<IndexArea> asCollection(final IndexAreaSet indexAreaSet) {
return new Iterable<IndexArea>() {
@Override
public Iterator<IndexArea> iterator() {
return indexAreaSet.iterator();
}
};
}
public static Iterable<IndexJobClassItem> asCollection(final IndexJobClassItemList indexJobClassItemList) {
return new Iterable<IndexJobClassItem>() {
@Override
public Iterator<IndexJobClassItem> iterator() {
return indexJobClassItemList.iterator();
}
};
}
public static Iterable<IndexJobCollectionItem> asCollection(final IndexJobCollectionItemList indexJobCollectionItemList) {
return new Iterable<IndexJobCollectionItem>() {
@Override
public Iterator<IndexJobCollectionItem> iterator() {
return indexJobCollectionItemList.iterator();
}
};
}
public static Iterable<IndexJobItem> asCollection(final IndexJobItemList indexJobItemList) {
return new Iterable<IndexJobItem>() {
@Override
public Iterator<IndexJobItem> iterator() {
return indexJobItemList.iterator();
}
};
}
public static Iterable<IndexJob> asCollection(final IndexJobSet indexJobSet) {
return new Iterable<IndexJob>() {
@Override
public Iterator<IndexJob> iterator() {
return indexJobSet.iterator();
}
};
}
public static Iterable<IndexJobSingleItem> asCollection(final IndexJobSingleItemList indexJobSingleItemList) {
return new Iterable<IndexJobSingleItem>() {
@Override
public Iterator<IndexJobSingleItem> iterator() {
return indexJobSingleItemList.iterator();
}
};
}
public static Iterable<InstanceSubscription> asCollection(final InstanceSubscriptionSet instanceSubscriptionSet) {
return new Iterable<InstanceSubscription>() {
@Override
public Iterator<InstanceSubscription> iterator() {
return instanceSubscriptionSet.iterator();
}
};
}
public static Iterable<InstanceWorkflowSubscription> asCollection(final InstanceWorkflowSubscriptionSet instanceWorkflowSubscriptionSet) {
return new Iterable<InstanceWorkflowSubscription>() {
@Override
public Iterator<InstanceWorkflowSubscription> iterator() {
return instanceWorkflowSubscriptionSet.iterator();
}
};
}
public static Iterable<Integer> asCollection(final Integer32List integer32List) {
return new Iterable<Integer>() {
@Override
public Iterator<Integer> iterator() {
return integer32List.iterator();
}
};
}
public static Iterable<IsolatedRegion> asCollection(final IsolatedRegionSet isolatedRegionSet) {
return new Iterable<IsolatedRegion>() {
@Override
public Iterator<IsolatedRegion> iterator() {
return isolatedRegionSet.iterator();
}
};
}
public static Iterable<Link> asCollection(final LinkSet linkSet) {
return new Iterable<Link>() {
@Override
public Iterator<Link> iterator() {
return linkSet.iterator();
}
};
}
public static Iterable<LocalizedString> asCollection(final LocalizedStringList localizedStringList) {
return new Iterable<LocalizedString>() {
@Override
public Iterator<LocalizedString> iterator() {
return localizedStringList.iterator();
}
};
}
public static Iterable<LockEvent> asCollection(final LockEventSet lockEventSet) {
return new Iterable<LockEvent>() {
@Override
public Iterator<LockEvent> iterator() {
return lockEventSet.iterator();
}
};
}
public static Iterable<Marking> asCollection(final MarkingList markingList) {
return new Iterable<Marking>() {
@Override
public Iterator<Marking> iterator() {
return markingList.iterator();
}
};
}
public static Iterable<MarkingSet> asCollection(final MarkingSetSet markingSetSet) {
return new Iterable<MarkingSet>() {
@Override
public Iterator<MarkingSet> iterator() {
return markingSetSet.iterator();
}
};
}
public static Iterable<ObjectChangeEvent> asCollection(final ObjectChangeEventSet objectChangeEventSet) {
return new Iterable<ObjectChangeEvent>() {
@Override
public Iterator<ObjectChangeEvent> iterator() {
return objectChangeEventSet.iterator();
}
};
}
public static Iterable<ObjectStoreParticipant> asCollection(final ObjectStoreParticipantList objectStoreParticipantList) {
return new Iterable<ObjectStoreParticipant>() {
@Override
public Iterator<ObjectStoreParticipant> iterator() {
return objectStoreParticipantList.iterator();
}
};
}
public static Iterable<ObjectStore> asCollection(final ObjectStoreSet objectStoreSet) {
return new Iterable<ObjectStore>() {
@Override
public Iterator<ObjectStore> iterator() {
return objectStoreSet.iterator();
}
};
}
public static Iterable<PEConnectionPoint> asCollection(final PEConnectionPointSet pEConnectionPointSet) {
return new Iterable<PEConnectionPoint>() {
@Override
public Iterator<PEConnectionPoint> iterator() {
return pEConnectionPointSet.iterator();
}
};
}
public static Iterable<PermissionDescription> asCollection(final PermissionDescriptionList permissionDescriptionList) {
return new Iterable<PermissionDescription>() {
@Override
public Iterator<PermissionDescription> iterator() {
return permissionDescriptionList.iterator();
}
};
}
public static Iterable<Permission> asCollection(final PermissionList permissionList) {
return new Iterable<Permission>() {
@Override
public Iterator<Permission> iterator() {
return permissionList.iterator();
}
};
}
public static Iterable<PromoteVersionEvent> asCollection(final PromoteVersionEventSet promoteVersionEventSet) {
return new Iterable<PromoteVersionEvent>() {
@Override
public Iterator<PromoteVersionEvent> iterator() {
return promoteVersionEventSet.iterator();
}
};
}
public static Iterable<PropertyDefinitionBinary> asCollection(final PropertyDefinitionBinaryList propertyDefinitionBinaryList) {
return new Iterable<PropertyDefinitionBinary>() {
@Override
public Iterator<PropertyDefinitionBinary> iterator() {
return propertyDefinitionBinaryList.iterator();
}
};
}
public static Iterable<PropertyDefinitionBoolean> asCollection(final PropertyDefinitionBooleanList propertyDefinitionBooleanList) {
return new Iterable<PropertyDefinitionBoolean>() {
@Override
public Iterator<PropertyDefinitionBoolean> iterator() {
return propertyDefinitionBooleanList.iterator();
}
};
}
public static Iterable<PropertyDefinitionDateTime> asCollection(final PropertyDefinitionDateTimeList propertyDefinitionDateTimeList) {
return new Iterable<PropertyDefinitionDateTime>() {
@Override
public Iterator<PropertyDefinitionDateTime> iterator() {
return propertyDefinitionDateTimeList.iterator();
}
};
}
public static Iterable<PropertyDefinitionFloat64> asCollection(final PropertyDefinitionFloat64List propertyDefinitionFloat64List) {
return new Iterable<PropertyDefinitionFloat64>() {
@Override
public Iterator<PropertyDefinitionFloat64> iterator() {
return propertyDefinitionFloat64List.iterator();
}
};
}
public static Iterable<PropertyDefinitionId> asCollection(final PropertyDefinitionIdList propertyDefinitionIdList) {
return new Iterable<PropertyDefinitionId>() {
@Override
public Iterator<PropertyDefinitionId> iterator() {
return propertyDefinitionIdList.iterator();
}
};
}
public static Iterable<PropertyDefinitionInteger32> asCollection(final PropertyDefinitionInteger32List propertyDefinitionInteger32List) {
return new Iterable<PropertyDefinitionInteger32>() {
@Override
public Iterator<PropertyDefinitionInteger32> iterator() {
return propertyDefinitionInteger32List.iterator();
}
};
}
public static Iterable<PropertyDefinition> asCollection(final PropertyDefinitionList propertyDefinitionList) {
return new Iterable<PropertyDefinition>() {
@Override
public Iterator<PropertyDefinition> iterator() {
return propertyDefinitionList.iterator();
}
};
}
public static Iterable<PropertyDefinitionObject> asCollection(final PropertyDefinitionObjectList propertyDefinitionObjectList) {
return new Iterable<PropertyDefinitionObject>() {
@Override
public Iterator<PropertyDefinitionObject> iterator() {
return propertyDefinitionObjectList.iterator();
}
};
}
public static Iterable<PropertyDefinitionString> asCollection(final PropertyDefinitionStringList propertyDefinitionStringList) {
return new Iterable<PropertyDefinitionString>() {
@Override
public Iterator<PropertyDefinitionString> iterator() {
return propertyDefinitionStringList.iterator();
}
};
}
public static Iterable<PropertyDescriptionBinary> asCollection(final PropertyDescriptionBinaryList propertyDescriptionBinaryList) {
return new Iterable<PropertyDescriptionBinary>() {
@Override
public Iterator<PropertyDescriptionBinary> iterator() {
return propertyDescriptionBinaryList.iterator();
}
};
}
public static Iterable<PropertyDescriptionBoolean> asCollection(final PropertyDescriptionBooleanList propertyDescriptionBooleanList) {
return new Iterable<PropertyDescriptionBoolean>() {
@Override
public Iterator<PropertyDescriptionBoolean> iterator() {
return propertyDescriptionBooleanList.iterator();
}
};
}
public static Iterable<PropertyDescriptionDateTime> asCollection(final PropertyDescriptionDateTimeList propertyDescriptionDateTimeList) {
return new Iterable<PropertyDescriptionDateTime>() {
@Override
public Iterator<PropertyDescriptionDateTime> iterator() {
return propertyDescriptionDateTimeList.iterator();
}
};
}
public static Iterable<PropertyDescriptionFloat64> asCollection(final PropertyDescriptionFloat64List propertyDescriptionFloat64List) {
return new Iterable<PropertyDescriptionFloat64>() {
@Override
public Iterator<PropertyDescriptionFloat64> iterator() {
return propertyDescriptionFloat64List.iterator();
}
};
}
public static Iterable<PropertyDescriptionId> asCollection(final PropertyDescriptionIdList propertyDescriptionIdList) {
return new Iterable<PropertyDescriptionId>() {
@Override
public Iterator<PropertyDescriptionId> iterator() {
return propertyDescriptionIdList.iterator();
}
};
}
public static Iterable<PropertyDescriptionInteger32> asCollection(final PropertyDescriptionInteger32List propertyDescriptionInteger32List) {
return new Iterable<PropertyDescriptionInteger32>() {
@Override
public Iterator<PropertyDescriptionInteger32> iterator() {
return propertyDescriptionInteger32List.iterator();
}
};
}
public static Iterable<PropertyDescription> asCollection(final PropertyDescriptionList propertyDescriptionList) {
return new Iterable<PropertyDescription>() {
@Override
public Iterator<PropertyDescription> iterator() {
return propertyDescriptionList.iterator();
}
};
}
public static Iterable<PropertyDescriptionObject> asCollection(final PropertyDescriptionObjectList propertyDescriptionObjectList) {
return new Iterable<PropertyDescriptionObject>() {
@Override
public Iterator<PropertyDescriptionObject> iterator() {
return propertyDescriptionObjectList.iterator();
}
};
}
public static Iterable<PropertyDescriptionString> asCollection(final PropertyDescriptionStringList propertyDescriptionStringList) {
return new Iterable<PropertyDescriptionString>() {
@Override
public Iterator<PropertyDescriptionString> iterator() {
return propertyDescriptionStringList.iterator();
}
};
}
public static Iterable<PropertyTemplateBinary> asCollection(final PropertyTemplateBinarySet propertyTemplateBinarySet) {
return new Iterable<PropertyTemplateBinary>() {
@Override
public Iterator<PropertyTemplateBinary> iterator() {
return propertyTemplateBinarySet.iterator();
}
};
}
public static Iterable<PropertyTemplateBoolean> asCollection(final PropertyTemplateBooleanSet propertyTemplateBooleanSet) {
return new Iterable<PropertyTemplateBoolean>() {
@Override
public Iterator<PropertyTemplateBoolean> iterator() {
return propertyTemplateBooleanSet.iterator();
}
};
}
public static Iterable<PropertyTemplateDateTime> asCollection(final PropertyTemplateDateTimeSet propertyTemplateDateTimeSet) {
return new Iterable<PropertyTemplateDateTime>() {
@Override
public Iterator<PropertyTemplateDateTime> iterator() {
return propertyTemplateDateTimeSet.iterator();
}
};
}
public static Iterable<PropertyTemplateFloat64> asCollection(final PropertyTemplateFloat64Set propertyTemplateFloat64Set) {
return new Iterable<PropertyTemplateFloat64>() {
@Override
public Iterator<PropertyTemplateFloat64> iterator() {
return propertyTemplateFloat64Set.iterator();
}
};
}
public static Iterable<PropertyTemplateId> asCollection(final PropertyTemplateIdSet propertyTemplateIdSet) {
return new Iterable<PropertyTemplateId>() {
@Override
public Iterator<PropertyTemplateId> iterator() {
return propertyTemplateIdSet.iterator();
}
};
}
public static Iterable<PropertyTemplateInteger32> asCollection(final PropertyTemplateInteger32Set propertyTemplateInteger32Set) {
return new Iterable<PropertyTemplateInteger32>() {
@Override
public Iterator<PropertyTemplateInteger32> iterator() {
return propertyTemplateInteger32Set.iterator();
}
};
}
public static Iterable<PropertyTemplateObject> asCollection(final PropertyTemplateObjectSet propertyTemplateObjectSet) {
return new Iterable<PropertyTemplateObject>() {
@Override
public Iterator<PropertyTemplateObject> iterator() {
return propertyTemplateObjectSet.iterator();
}
};
}
public static Iterable<PropertyTemplate> asCollection(final PropertyTemplateSet propertyTemplateSet) {
return new Iterable<PropertyTemplate>() {
@Override
public Iterator<PropertyTemplate> iterator() {
return propertyTemplateSet.iterator();
}
};
}
public static Iterable<PropertyTemplateString> asCollection(final PropertyTemplateStringSet propertyTemplateStringSet) {
return new Iterable<PropertyTemplateString>() {
@Override
public Iterator<PropertyTemplateString> iterator() {
return propertyTemplateStringSet.iterator();
}
};
}
public static Iterable<PublishCompleteEvent> asCollection(final PublishCompleteEventSet publishCompleteEventSet) {
return new Iterable<PublishCompleteEvent>() {
@Override
public Iterator<PublishCompleteEvent> iterator() {
return publishCompleteEventSet.iterator();
}
};
}
public static Iterable<PublishRequestEvent> asCollection(final PublishRequestEventSet publishRequestEventSet) {
return new Iterable<PublishRequestEvent>() {
@Override
public Iterator<PublishRequestEvent> iterator() {
return publishRequestEventSet.iterator();
}
};
}
public static Iterable<PublishRequest> asCollection(final PublishRequestSet publishRequestSet) {
return new Iterable<PublishRequest>() {
@Override
public Iterator<PublishRequest> iterator() {
return publishRequestSet.iterator();
}
};
}
public static Iterable<PublishStyleTemplate> asCollection(final PublishStyleTemplateSet publishStyleTemplateSet) {
return new Iterable<PublishStyleTemplate>() {
@Override
public Iterator<PublishStyleTemplate> iterator() {
return publishStyleTemplateSet.iterator();
}
};
}
public static Iterable<PublishTemplate> asCollection(final PublishTemplateSet publishTemplateSet) {
return new Iterable<PublishTemplate>() {
@Override
public Iterator<PublishTemplate> iterator() {
return publishTemplateSet.iterator();
}
};
}
public static Iterable<PublishingConfiguration> asCollection(final PublishingConfigurationList publishingConfigurationList) {
return new Iterable<PublishingConfiguration>() {
@Override
public Iterator<PublishingConfiguration> iterator() {
return publishingConfigurationList.iterator();
}
};
}
public static Iterable<QueryEvent> asCollection(final QueryEventSet queryEventSet) {
return new Iterable<QueryEvent>() {
@Override
public Iterator<QueryEvent> iterator() {
return queryEventSet.iterator();
}
};
}
public static Iterable<QueueItem> asCollection(final QueueItemSet queueItemSet) {
return new Iterable<QueueItem>() {
@Override
public Iterator<QueueItem> iterator() {
return queueItemSet.iterator();
}
};
}
public static Iterable<Realm> asCollection(final RealmSet realmSet) {
return new Iterable<Realm>() {
@Override
public Iterator<Realm> iterator() {
return realmSet.iterator();
}
};
}
public static Iterable<ReferentialContainmentRelationship> asCollection(final ReferentialContainmentRelationshipSet referentialContainmentRelationshipSet) {
return new Iterable<ReferentialContainmentRelationship>() {
@Override
public Iterator<ReferentialContainmentRelationship> iterator() {
return referentialContainmentRelationshipSet.iterator();
}
};
}
public static Iterable<Relationship> asCollection(final RelationshipSet relationshipSet) {
return new Iterable<Relationship>() {
@Override
public Iterator<Relationship> iterator() {
return relationshipSet.iterator();
}
};
}
public static Iterable<RenditionEngineConnection> asCollection(final RenditionEngineConnectionSet renditionEngineConnectionSet) {
return new Iterable<RenditionEngineConnection>() {
@Override
public Iterator<RenditionEngineConnection> iterator() {
return renditionEngineConnectionSet.iterator();
}
};
}
public static Iterable<ReplicableClassDefinition> asCollection(final ReplicableClassDefinitionSet replicableClassDefinitionSet) {
return new Iterable<ReplicableClassDefinition>() {
@Override
public Iterator<ReplicableClassDefinition> iterator() {
return replicableClassDefinitionSet.iterator();
}
};
}
public static Iterable<Replicable> asCollection(final ReplicableSet replicableSet) {
return new Iterable<Replicable>() {
@Override
public Iterator<Replicable> iterator() {
return replicableSet.iterator();
}
};
}
public static Iterable<ReplicationConfiguration> asCollection(final ReplicationConfigurationList replicationConfigurationList) {
return new Iterable<ReplicationConfiguration>() {
@Override
public Iterator<ReplicationConfiguration> iterator() {
return replicationConfigurationList.iterator();
}
};
}
public static Iterable<ReplicationGroup> asCollection(final ReplicationGroupSet replicationGroupSet) {
return new Iterable<ReplicationGroup>() {
@Override
public Iterator<ReplicationGroup> iterator() {
return replicationGroupSet.iterator();
}
};
}
public static Iterable<ReplicationJournalEntry> asCollection(final ReplicationJournalEntrySet replicationJournalEntrySet) {
return new Iterable<ReplicationJournalEntry>() {
@Override
public Iterator<ReplicationJournalEntry> iterator() {
return replicationJournalEntrySet.iterator();
}
};
}
public static Iterable<ReplicationParticipant> asCollection(final ReplicationParticipantList replicationParticipantList) {
return new Iterable<ReplicationParticipant>() {
@Override
public Iterator<ReplicationParticipant> iterator() {
return replicationParticipantList.iterator();
}
};
}
public static Iterable<RepositoryRow> asCollection(final RepositoryRowSet repositoryRowSet) {
return new Iterable<RepositoryRow>() {
@Override
public Iterator<RepositoryRow> iterator() {
return repositoryRowSet.iterator();
}
};
}
public static Iterable<Repository> asCollection(final RepositorySet repositorySet) {
return new Iterable<Repository>() {
@Override
public Iterator<Repository> iterator() {
return repositorySet.iterator();
}
};
}
public static Iterable<RetrievalEvent> asCollection(final RetrievalEventSet retrievalEventSet) {
return new Iterable<RetrievalEvent>() {
@Override
public Iterator<RetrievalEvent> iterator() {
return retrievalEventSet.iterator();
}
};
}
public static Iterable<SecurityPolicy> asCollection(final SecurityPolicySet securityPolicySet) {
return new Iterable<SecurityPolicy>() {
@Override
public Iterator<SecurityPolicy> iterator() {
return securityPolicySet.iterator();
}
};
}
public static Iterable<SecurityPrincipal> asCollection(final SecurityPrincipalSet securityPrincipalSet) {
return new Iterable<SecurityPrincipal>() {
@Override
public Iterator<SecurityPrincipal> iterator() {
return securityPrincipalSet.iterator();
}
};
}
public static Iterable<SecurityPropagationQueueItem> asCollection(final SecurityPropagationQueueItemSet securityPropagationQueueItemSet) {
return new Iterable<SecurityPropagationQueueItem>() {
@Override
public Iterator<SecurityPropagationQueueItem> iterator() {
return securityPropagationQueueItemSet.iterator();
}
};
}
public static Iterable<SecurityTemplate> asCollection(final SecurityTemplateList securityTemplateList) {
return new Iterable<SecurityTemplate>() {
@Override
public Iterator<SecurityTemplate> iterator() {
return securityTemplateList.iterator();
}
};
}
public static Iterable<ServerCacheConfiguration> asCollection(final ServerCacheConfigurationList serverCacheConfigurationList) {
return new Iterable<ServerCacheConfiguration>() {
@Override
public Iterator<ServerCacheConfiguration> iterator() {
return serverCacheConfigurationList.iterator();
}
};
}
public static Iterable<ServerInstance> asCollection(final ServerInstanceSet serverInstanceSet) {
return new Iterable<ServerInstance>() {
@Override
public Iterator<ServerInstance> iterator() {
return serverInstanceSet.iterator();
}
};
}
public static Iterable<Site> asCollection(final SiteSet siteSet) {
return new Iterable<Site>() {
@Override
public Iterator<Site> iterator() {
return siteSet.iterator();
}
};
}
public static Iterable<SiteSettings> asCollection(final SiteSettingsList siteSettingsList) {
return new Iterable<SiteSettings>() {
@Override
public Iterator<SiteSettings> iterator() {
return siteSettingsList.iterator();
}
};
}
public static Iterable<SnapLockFixedContentDevice> asCollection(final SnapLockFixedContentDeviceSet snapLockFixedContentDeviceSet) {
return new Iterable<SnapLockFixedContentDevice>() {
@Override
public Iterator<SnapLockFixedContentDevice> iterator() {
return snapLockFixedContentDeviceSet.iterator();
}
};
}
public static Iterable<StorageArea> asCollection(final StorageAreaSet storageAreaSet) {
return new Iterable<StorageArea>() {
@Override
public Iterator<StorageArea> iterator() {
return storageAreaSet.iterator();
}
};
}
public static Iterable<StoragePolicy> asCollection(final StoragePolicySet storagePolicySet) {
return new Iterable<StoragePolicy>() {
@Override
public Iterator<StoragePolicy> iterator() {
return storagePolicySet.iterator();
}
};
}
public static Iterable<StoredSearch> asCollection(final StoredSearchSet storedSearchSet) {
return new Iterable<StoredSearch>() {
@Override
public Iterator<StoredSearch> iterator() {
return storedSearchSet.iterator();
}
};
}
public static Iterable<String> asCollection(final StringList stringList) {
return new Iterable<String>() {
@Override
public Iterator<String> iterator() {
return stringList.iterator();
}
};
}
public static Iterable<SubscribableClassDefinition> asCollection(final SubscribableClassDefinitionSet subscribableClassDefinitionSet) {
return new Iterable<SubscribableClassDefinition>() {
@Override
public Iterator<SubscribableClassDefinition> iterator() {
return subscribableClassDefinitionSet.iterator();
}
};
}
public static Iterable<Subscribable> asCollection(final SubscribableSet subscribableSet) {
return new Iterable<Subscribable>() {
@Override
public Iterator<Subscribable> iterator() {
return subscribableSet.iterator();
}
};
}
public static Iterable<SubscribedEvent> asCollection(final SubscribedEventList subscribedEventList) {
return new Iterable<SubscribedEvent>() {
@Override
public Iterator<SubscribedEvent> iterator() {
return subscribedEventList.iterator();
}
};
}
public static Iterable<Subscription> asCollection(final SubscriptionSet subscriptionSet) {
return new Iterable<Subscription>() {
@Override
public Iterator<Subscription> iterator() {
return subscriptionSet.iterator();
}
};
}
public static Iterable<SubsystemConfiguration> asCollection(final SubsystemConfigurationList subsystemConfigurationList) {
return new Iterable<SubsystemConfiguration>() {
@Override
public Iterator<SubsystemConfiguration> iterator() {
return subsystemConfigurationList.iterator();
}
};
}
public static Iterable<TableDefinition> asCollection(final TableDefinitionSet tableDefinitionSet) {
return new Iterable<TableDefinition>() {
@Override
public Iterator<TableDefinition> iterator() {
return tableDefinitionSet.iterator();
}
};
}
public static Iterable<TakeFederatedOwnershipEvent> asCollection(final TakeFederatedOwnershipEventSet takeFederatedOwnershipEventSet) {
return new Iterable<TakeFederatedOwnershipEvent>() {
@Override
public Iterator<TakeFederatedOwnershipEvent> iterator() {
return takeFederatedOwnershipEventSet.iterator();
}
};
}
public static Iterable<TivoliFixedContentDevice> asCollection(final TivoliFixedContentDeviceSet tivoliFixedContentDeviceSet) {
return new Iterable<TivoliFixedContentDevice>() {
@Override
public Iterator<TivoliFixedContentDevice> iterator() {
return tivoliFixedContentDeviceSet.iterator();
}
};
}
public static Iterable<TraceLoggingConfiguration> asCollection(final TraceLoggingConfigurationList traceLoggingConfigurationList) {
return new Iterable<TraceLoggingConfiguration>() {
@Override
public Iterator<TraceLoggingConfiguration> iterator() {
return traceLoggingConfigurationList.iterator();
}
};
}
public static Iterable<UnfileEvent> asCollection(final UnfileEventSet unfileEventSet) {
return new Iterable<UnfileEvent>() {
@Override
public Iterator<UnfileEvent> iterator() {
return unfileEventSet.iterator();
}
};
}
public static Iterable<UnlockEvent> asCollection(final UnlockEventSet unlockEventSet) {
return new Iterable<UnlockEvent>() {
@Override
public Iterator<UnlockEvent> iterator() {
return unlockEventSet.iterator();
}
};
}
public static Iterable<UpdateEvent> asCollection(final UpdateEventSet updateEventSet) {
return new Iterable<UpdateEvent>() {
@Override
public Iterator<UpdateEvent> iterator() {
return updateEventSet.iterator();
}
};
}
public static Iterable<UpdateSecurityEvent> asCollection(final UpdateSecurityEventSet updateSecurityEventSet) {
return new Iterable<UpdateSecurityEvent>() {
@Override
public Iterator<UpdateSecurityEvent> iterator() {
return updateSecurityEventSet.iterator();
}
};
}
public static Iterable<UpgradeAddOn> asCollection(final UpgradeAddOnSet upgradeAddOnSet) {
return new Iterable<UpgradeAddOn>() {
@Override
public Iterator<UpgradeAddOn> iterator() {
return upgradeAddOnSet.iterator();
}
};
}
public static Iterable<User> asCollection(final UserSet userSet) {
return new Iterable<User>() {
@Override
public Iterator<User> iterator() {
return userSet.iterator();
}
};
}
public static Iterable<VerityCollection> asCollection(final VerityCollectionList verityCollectionList) {
return new Iterable<VerityCollection>() {
@Override
public Iterator<VerityCollection> iterator() {
return verityCollectionList.iterator();
}
};
}
public static Iterable<VerityDomainConfiguration> asCollection(final VerityDomainConfigurationSet verityDomainConfigurationSet) {
return new Iterable<VerityDomainConfiguration>() {
@Override
public Iterator<VerityDomainConfiguration> iterator() {
return verityDomainConfigurationSet.iterator();
}
};
}
public static Iterable<VerityIndexArea> asCollection(final VerityIndexAreaSet verityIndexAreaSet) {
return new Iterable<VerityIndexArea>() {
@Override
public Iterator<VerityIndexArea> iterator() {
return verityIndexAreaSet.iterator();
}
};
}
public static Iterable<VerityServerConfiguration> asCollection(final VerityServerConfigurationList verityServerConfigurationList) {
return new Iterable<VerityServerConfiguration>() {
@Override
public Iterator<VerityServerConfiguration> iterator() {
return verityServerConfigurationList.iterator();
}
};
}
public static Iterable<VersionSeries> asCollection(final VersionSeriesSet versionSeriesSet) {
return new Iterable<VersionSeries>() {
@Override
public Iterator<VersionSeries> iterator() {
return versionSeriesSet.iterator();
}
};
}
public static Iterable<VersionableClassDefinition> asCollection(final VersionableClassDefinitionSet versionableClassDefinitionSet) {
return new Iterable<VersionableClassDefinition>() {
@Override
public Iterator<VersionableClassDefinition> iterator() {
return versionableClassDefinitionSet.iterator();
}
};
}
public static Iterable<Versionable> asCollection(final VersionableSet versionableSet) {
return new Iterable<Versionable>() {
@Override
public Iterator<Versionable> iterator() {
return versionableSet.iterator();
}
};
}
public static Iterable<VersioningSecurityTemplate> asCollection(final VersioningSecurityTemplateList versioningSecurityTemplateList) {
return new Iterable<VersioningSecurityTemplate>() {
@Override
public Iterator<VersioningSecurityTemplate> iterator() {
return versioningSecurityTemplateList.iterator();
}
};
}
public static Iterable<VirtualServer> asCollection(final VirtualServerSet virtualServerSet) {
return new Iterable<VirtualServer>() {
@Override
public Iterator<VirtualServer> iterator() {
return virtualServerSet.iterator();
}
};
}
public static Iterable<WorkflowDefinition> asCollection(final WorkflowDefinitionSet workflowDefinitionSet) {
return new Iterable<WorkflowDefinition>() {
@Override
public Iterator<WorkflowDefinition> iterator() {
return workflowDefinitionSet.iterator();
}
};
}
public static Iterable<WorkflowEventAction> asCollection(final WorkflowEventActionSet workflowEventActionSet) {
return new Iterable<WorkflowEventAction>() {
@Override
public Iterator<WorkflowEventAction> iterator() {
return workflowEventActionSet.iterator();
}
};
}
public static Iterable<XMLPropertyMappingScript> asCollection(final XMLPropertyMappingScriptSet xmlPropertyMappingScriptSet) {
return new Iterable<XMLPropertyMappingScript>() {
@Override
public Iterator<XMLPropertyMappingScript> iterator() {
return xmlPropertyMappingScriptSet.iterator();
}
};
}
/* End of generated code */
}
package com.ecmdeveloper.jace.collections;
import java.io.IOException;
import java.net.URI;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.filenet.api.collection.DocumentSet;
import com.filenet.api.core.Document;
/**
* @author ricardobelfor
*
*/
public class GenerateCode {
public static void main(String[] args) {
if ( args.length != 1) {
System.out.println("Please provide the path the 'Jace.jar' file");
System.exit(1);
}
URI uri = URI.create("jar:file:" + args[0]);
try {
FileSystem fileSystem = FileSystems.newFileSystem(uri, Collections.<String, String>emptyMap());
Path path = fileSystem.getPath("/com/filenet/api/collection");
System.out.println( "/* Start of generated code */");
try (Stream<Path> walk = Files.walk(path, 1) ) {
List<String> collectionClasses = Files.find(path, 1, (path2, basicFileAttributes) -> String.valueOf(path2).endsWith(".class") )
.map( file -> file.getName(file.getNameCount()-1).toString().replace( ".class", ""))
.filter( name -> !(name.equals("EngineSet") || name.equals("PageIterator") || name.equals("PageMark")) )
.sorted()
.collect(Collectors.toList());
for ( String collectionClass : collectionClasses) {
generateCode(collectionClass);
}
}
System.out.println( "/* End of generated code */");
} catch (IOException e) {
e.printStackTrace();
}
}
private static void generateCode(String collectionClass) {
String collectionItem = getCollectionItem(collectionClass);
String collectionParameter = getCollectionParameter(collectionClass);
System.out.println("public static Iterable<" + collectionItem + "> asCollection(final " + collectionClass + " " + collectionParameter + ") {" );
System.out.println(" return new Iterable<" + collectionItem + ">() {" );
System.out.println(" @Override" );
System.out.println(" public Iterator<" + collectionItem +"> iterator() {");
System.out.println(" return " + collectionParameter + ".iterator();");
System.out.println(" }");
System.out.println(" };");
System.out.println("}");
}
private static String getCollectionParameter(String collectionClass) {
String collectionParameter = Character.toLowerCase(collectionClass.charAt(0)) +
(collectionClass.length() > 1 ? collectionClass.substring(1) : "");
collectionParameter = collectionParameter.replace("xML", "xml"); // This looks nicer...
return collectionParameter;
}
private static String getCollectionItem(String collectionClass) {
String collectionItem = collectionClass.replace("List", "");
if ( collectionItem.endsWith("Set") ) {
collectionItem = collectionItem.substring(0, collectionItem.length() -3 );
}
switch (collectionItem) {
case "Float64": return "Double";
case "DateTime": return "Date";
case "Integer32": return "Integer";
case "Binary": return "byte[]";
}
return collectionItem;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment