Toggle navigation
Home
org.apache.usergrid.persistence.core.scope.ApplicationEntityGroup to org.apache.usergrid.persistence.core.scope.ApplicationEntityGroup<org.apache.usergrid.persistence.collection.CollectionScope>
No. of Instances - 1
No. of Commits - 1
No. of Projects - {'usergrid'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Cascading Type Change (Different)
Func1<List<EntityIdScope>,ApplicationEntityGroup>
to
Func1<List<EntityIdScope<CollectionScope>>,ApplicationEntityGroup<CollectionScope>>
Func1<List<Id>,List<EntityIdScope>>
to
Func1<List<Id>,List<EntityIdScope<CollectionScope>>>
Func1<Id,Observable<ApplicationEntityGroup>>
to
Func1<Id,Observable<ApplicationEntityGroup<CollectionScope>>>
Add or Remove Method invocation
Observable.merge(applicationNode,entityNodes).buffer(bufferSize).map(new Func1<List<Id>,List<EntityIdScope<CollectionScope>>>(){ @Override public List<EntityIdScope> call( List<Id> ids){ List<EntityIdScope> scopes=new ArrayList<>(ids.size()); for ( Id id : ids) { CollectionScope scope=CpNamingUtils.getCollectionScopeNameFromEntityType(applicationId,id.getType()); EntityIdScope idScope=new EntityIdScope(id,scope); scopes.add(idScope); } return scopes; } } )
to
Observable.merge(applicationNode,entityNodes).buffer(bufferSize).map(new Func1<List<Id>,List<EntityIdScope<CollectionScope>>>(){ @Override public List<EntityIdScope<CollectionScope>> call( List<Id> ids){ List<EntityIdScope<CollectionScope>> scopes=new ArrayList<>(ids.size()); for ( Id id : ids) { CollectionScope scope=CpNamingUtils.getCollectionScopeNameFromEntityType(applicationId,id.getType()); EntityIdScope<CollectionScope> idScope=new EntityIdScope<>(id,scope); scopes.add(idScope); } return scopes; } } )
Update Anonymous class
{ @Override public List<EntityIdScope> call( List<Id> ids){ List<EntityIdScope> scopes=new ArrayList<>(ids.size()); for ( Id id : ids) { CollectionScope scope=CpNamingUtils.getCollectionScopeNameFromEntityType(applicationId,id.getType()); EntityIdScope idScope=new EntityIdScope(id,scope); scopes.add(idScope); } return scopes; } }
to
{ @Override public List<EntityIdScope<CollectionScope>> call( List<Id> ids){ List<EntityIdScope<CollectionScope>> scopes=new ArrayList<>(ids.size()); for ( Id id : ids) { CollectionScope scope=CpNamingUtils.getCollectionScopeNameFromEntityType(applicationId,id.getType()); EntityIdScope<CollectionScope> idScope=new EntityIdScope<>(id,scope); scopes.add(idScope); } return scopes; } }
{ @Override public Observable<ApplicationEntityGroup> call( final Id applicationId){ final ApplicationScope applicationScope=new ApplicationScopeImpl(applicationId); final GraphManager gm=graphManagerFactory.createEdgeManager(applicationScope); final Observable<Id> entityNodes=targetIdObservable.getTargetNodes(gm,applicationId); final Observable<Id> applicationNode=Observable.just(applicationId); return Observable.merge(applicationNode,entityNodes).buffer(bufferSize).map(new Func1<List<Id>,List<EntityIdScope>>(){ @Override public List<EntityIdScope> call( List<Id> ids){ List<EntityIdScope> scopes=new ArrayList<>(ids.size()); for ( Id id : ids) { CollectionScope scope=CpNamingUtils.getCollectionScopeNameFromEntityType(applicationId,id.getType()); EntityIdScope idScope=new EntityIdScope(id,scope); scopes.add(idScope); } return scopes; } } ).map(new Func1<List<EntityIdScope>,ApplicationEntityGroup>(){ @Override public ApplicationEntityGroup call( final List<EntityIdScope> scopes){ return new ApplicationEntityGroup(applicationScope,scopes); } } ); } }
to
{ @Override public Observable<ApplicationEntityGroup<CollectionScope>> call( final Id applicationId){ final ApplicationScope applicationScope=new ApplicationScopeImpl(applicationId); final GraphManager gm=graphManagerFactory.createEdgeManager(applicationScope); final Observable<Id> entityNodes=targetIdObservable.getTargetNodes(gm,applicationId); final Observable<Id> applicationNode=Observable.just(applicationId); return Observable.merge(applicationNode,entityNodes).buffer(bufferSize).map(new Func1<List<Id>,List<EntityIdScope<CollectionScope>>>(){ @Override public List<EntityIdScope<CollectionScope>> call( List<Id> ids){ List<EntityIdScope<CollectionScope>> scopes=new ArrayList<>(ids.size()); for ( Id id : ids) { CollectionScope scope=CpNamingUtils.getCollectionScopeNameFromEntityType(applicationId,id.getType()); EntityIdScope<CollectionScope> idScope=new EntityIdScope<>(id,scope); scopes.add(idScope); } return scopes; } } ).map(new Func1<List<EntityIdScope<CollectionScope>>,ApplicationEntityGroup<CollectionScope>>(){ @Override public ApplicationEntityGroup<CollectionScope> call( final List<EntityIdScope<CollectionScope>> scopes){ return new ApplicationEntityGroup<>(applicationScope,scopes); } } ); } }