public static ERXFetchSpecification<ERTag> fetchSpec() { return new ERXFetchSpecification<ERTag>(_ERTag.ENTITY_NAME, null, null, false, true, null); }
public static ERXFetchSpecification<Person> fetchSpec() { return new ERXFetchSpecification<Person>(_Person.ENTITY_NAME, null, null, false, true, null); }
public static ERXFetchSpecification<GenderType> fetchSpec() { return new ERXFetchSpecification<GenderType>(_GenderType.ENTITY_NAME, null, null, false, true, null); }
public static NSArray<ERTag> fetchERTags(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { ERXFetchSpecification<ERTag> fetchSpec = new ERXFetchSpecification<ERTag>(_ERTag.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); NSArray<ERTag> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; }
public static NSArray<GenderType> fetchGenderTypes(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { ERXFetchSpecification<GenderType> fetchSpec = new ERXFetchSpecification<GenderType>(_GenderType.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); NSArray<GenderType> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; }
public static NSArray<Person> fetchPersons(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { ERXFetchSpecification<Person> fetchSpec = new ERXFetchSpecification<Person>(_Person.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); NSArray<Person> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; }
/** * Will fetch related rows for the given row relationship. The * context will be used to access the needed entity store. * * @param entity * the current entity * @param row * the currently selected row * @param relationship * the relationship * @param context * the memory adaptor context * @return array of rows from related entity store */ protected NSArray<NSMutableDictionary<String, Object>> fetchRelatedRows(EOEntity entity, NSDictionary<String, Object> row, EORelationship relationship, ERMemoryAdaptorContext context) { EOEntity destEntity = relationship.destinationEntity(); EREntityStore destStore = context._entityStoreForEntity(destEntity); String sourceAttribute = relationship.sourceAttributes().get(0).name(); String destinationAttribute = relationship.destinationAttributes().get(0).name(); ERXFetchSpecification fs = new ERXFetchSpecification(destEntity.name(), ERXQ.equals(destinationAttribute, row.valueForKey(sourceAttribute)), null); return destStore.fetch(destEntity.attributesToFetch(), fs, false, destEntity, context); }
String destinationAttribute = toJoinRelationship.destinationAttributes().get(0).name(); ERXFetchSpecification fs = new ERXFetchSpecification(joinEntity.name(), ERXQ.equals(destinationAttribute, row.valueForKey(sourceAttribute)), null); NSArray<NSMutableDictionary<String, Object>> fetchedObjects = joinStore.fetch(joinEntity.attributesToFetch(), EOEntity destEntity = relationship.destinationEntity(); fs = new ERXFetchSpecification(destEntity.name(), ERXQ.in(destinationAttribute, destValues), null); EREntityStore destinationStore = context._entityStoreForEntity(destEntity); fetchedObjects = destinationStore.fetch(destEntity.attributesToFetch(), fs, false, destEntity, context);