private <T extends Partition> void loadAttributes(final IdentityContext context, final T partition) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(context); if (attributeStore != null) { attributeStore.loadAttributes(context, partition); } }
private <T extends Partition> void loadAttributes(final IdentityContext context, final T partition) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(context); if (attributeStore != null) { attributeStore.loadAttributes(context, partition); } }
protected void addAttributes(IdentityContext identityContext, AttributedType identityType) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(identityContext); if (attributeStore != null) { for (Attribute<? extends Serializable> attribute : getAttributes(identityContext, identityType).values()) { attributeStore.setAttribute(identityContext, identityType, attribute); } } }
protected void addAttributes(IdentityContext identityContext, AttributedType identityType) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(identityContext); if (attributeStore != null) { for (Attribute<? extends Serializable> attribute : getAttributes(identityContext, identityType).values()) { attributeStore.setAttribute(identityContext, identityType, attribute); } } }
protected void removeAllAttributes(AttributedType storedType) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(identityContext); if (attributeStore != null) { for (Attribute<? extends Serializable> attribute : storedType.getAttributes()) { attributeStore.removeAttribute(identityContext, storedType, attribute.getName()); } } }
protected void removeAllAttributes(AttributedType storedType) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(identityContext); if (attributeStore != null) { for (Attribute<? extends Serializable> attribute : storedType.getAttributes()) { attributeStore.removeAttribute(identityContext, storedType, attribute.getName()); } } }
protected void removeAttributes(IdentityContext identityContext, AttributedType identityType, AttributedType storedType) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(identityContext); if (attributeStore != null) { if (storedType != null) { Map<String, Attribute> attributes = getAttributes(identityContext, identityType); for (Attribute<? extends Serializable> attribute : storedType.getAttributes()) { if (attributes.get(attribute.getName()) == null) { attributeStore.removeAttribute(identityContext, identityType, attribute.getName()); } } } } }
protected void removeAttributes(IdentityContext identityContext, AttributedType identityType, AttributedType storedType) { AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(identityContext); if (attributeStore != null) { if (storedType != null) { Map<String, Attribute> attributes = getAttributes(identityContext, identityType); for (Attribute<? extends Serializable> attribute : storedType.getAttributes()) { if (attributes.get(attribute.getName()) == null) { attributeStore.removeAttribute(identityContext, identityType, attribute.getName()); } } } } }
AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(this.context);
AttributeStore<?> attributeStore = getStoreSelector().getStoreForAttributeOperation(this.context);
@Override public List<T> getResultList() { // remove this statement once deprecated methods on IdentityQuery are removed if (this.sortParameters != null) { for (QueryParameter parameter : this.sortParameters) { if (isSortAscending()) { sortBy(this.queryBuilder.asc(parameter)); } else { sortBy(this.queryBuilder.desc(parameter)); } } } List<T> result = new ArrayList<T>(); try { Set<IdentityStore<?>> identityStores = this.storeSelector.getStoresForIdentityQuery(this.context, this.getIdentityType()); AttributeStore<?> attributeStore = this.storeSelector.getStoreForAttributeOperation(context); for (IdentityStore<?> store : identityStores) { for (T identityType : store.fetchQueryResults(this.context, this)) { configureDefaultPartition(this.context, identityType, store, this.partitionManager); if (attributeStore != null) { attributeStore.loadAttributes(this.context, identityType); } result.add(identityType); } } } catch (Exception e) { throw MESSAGES.queryIdentityTypeFailed(this, e); } return result; }
@Override public List<T> getResultList() { // remove this statement once deprecated methods on IdentityQuery are removed if (this.sortParameters != null) { for (QueryParameter parameter : this.sortParameters) { if (isSortAscending()) { sortBy(this.queryBuilder.asc(parameter)); } else { sortBy(this.queryBuilder.desc(parameter)); } } } List<T> result = new ArrayList<T>(); try { Set<IdentityStore<?>> identityStores = this.storeSelector.getStoresForIdentityQuery(this.context, this.getIdentityType()); AttributeStore<?> attributeStore = this.storeSelector.getStoreForAttributeOperation(context); for (IdentityStore<?> store : identityStores) { for (T identityType : store.fetchQueryResults(this.context, this)) { configureDefaultPartition(this.context, identityType, store, this.partitionManager); if (attributeStore != null) { attributeStore.loadAttributes(this.context, identityType); } result.add(identityType); } } } catch (Exception e) { throw MESSAGES.queryIdentityTypeFailed(this, e); } return result; }