Examples of destinationEntity()


Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

        String displayName = null;
        EORelationship relationship = (EORelationship)context.valueForKey("smartRelationship");
        if (relationship != null) {
            EOEntity entity = (EOEntity)context.valueForKey("entity");
            if (entity != null) {
                context.takeValueForKey(relationship.destinationEntity(), "entity");
                displayName = (String)context.valueForKey("displayNameForEntity");
            } else {
                log.warn("Current context: " + context + " doesn't have an entity, very strange, defaulting to destination entity name.");
                displayName = relationship.destinationEntity().name();
            }
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

            if (entity != null) {
                context.takeValueForKey(relationship.destinationEntity(), "entity");
                displayName = (String)context.valueForKey("displayNameForEntity");
            } else {
                log.warn("Current context: " + context + " doesn't have an entity, very strange, defaulting to destination entity name.");
                displayName = relationship.destinationEntity().name();
            }
        }
        return displayName;
    }   
}
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

         
          return new EvaluatingFilter<T>(filter, entity, qualifier);
        }
        if (rel != null
            && ! RelationshipStore.shouldBeStoredAsRelationship(rel.entity())
            && ! RelationshipStore.shouldBeStoredAsRelationship(rel.destinationEntity()) ) {
          // it's using foreign key
          Results<T> filter = (Results<T>) foreignKeyReference(db, rel, (Collection<? extends Number>) values);
         
          return new EvaluatingFilter<T>(filter, entity, qualifier);
        }
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

      EORelationship rel = current.relationshipNamed(key);
      RelationshipRetriever<? extends PropertyContainer, ? extends PropertyContainer> r = RelationshipRetriever.create(rel);
     
      interimRetrievers.add(r);
     
      current = rel.destinationEntity();
    }
   
    // now handle last one (which could be attribute or relationship)
    {
      String key = splits[splits.length - 1];
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

    // Default case
    // --- (4) Case where relationship has not been faulted, and no snapshot array exists
    EOQualifier q = EODatabaseDataSource._qualifierForRelationshipKey(relationshipName, object);
    // --- (4) return result
    return objectCountWithQualifier(ec, relationship.destinationEntity().name(), q);
  }

    /**
     * Returns the number of objects in the database with the qualifier and counting attribute.  This implementation
     * queries the database directly without loading the objects into memory.
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

            return valueForKeyPath(restrictedChoiceKey);
        String fetchSpecName=(String)d2wContext().valueForKey("restrictingFetchSpecification");
        if(fetchSpecName != null) {
            EORelationship relationship = ERXUtilities.relationshipWithObjectAndKeyPath(object(),
                                                                                        (String)d2wContext().valueForKey("propertyKey"));
            return EOUtilities.objectsWithFetchSpecificationAndBindings(object().editingContext(), relationship.destinationEntity().name(),fetchSpecName,null);
        }
        return null;
    }
}
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

            return valueForKeyPath(restrictedChoiceKey);
        String fetchSpecName=(String)d2wContext().valueForKey("restrictingFetchSpecification");
        if(fetchSpecName != null) {
            EORelationship relationship = ERXUtilities.relationshipWithObjectAndKeyPath(object(), (String)d2wContext().valueForKey("propertyKey"));
            if(relationship != null)
                return EOUtilities.objectsWithFetchSpecificationAndBindings(object().editingContext(), relationship.destinationEntity().name(),fetchSpecName,null);
        }
        return null;
    }

    private Object _selectedChoiceList = null;
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

    }

    public Format valueFormatter() {
        Format f = null;
        EORelationship rel = (EORelationship) valueForKeyPath("d2wContext.smartRelationship");
        EOEntity destEnt = rel.destinationEntity();
        EOAttribute searchAttr = destEnt.attributeNamed(keyWhenRelationship());
        if(searchAttr != null) {
            String className = searchAttr.className();
            if(className.equals("java.lang.Number"))
                f = new NSNumberFormatter("0");
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

        String fetchSpecName=(String)d2wContext().valueForKey("restrictingFetchSpecification");
        if(fetchSpecName != null) {
            EOEditingContext ec = ERXEC.newEditingContext();
            EOEntity entity = d2wContext().entity();
            EORelationship relationship = entity.relationshipNamed((String)d2wContext().valueForKey("propertyKey"));
            return EOUtilities.objectsWithFetchSpecificationAndBindings(ec, relationship.destinationEntity().name(),fetchSpecName,null);
        }
        return null;
    }
}
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

            EOEntity entity = d2wContext().entity();
            EORelationship relationship = entity.relationshipNamed((String) d2wContext().valueForKey("propertyKey"));
            ec.lock();
            try {
                return EOUtilities.objectsWithFetchSpecificationAndBindings(ec,
                        relationship.destinationEntity().name(), fetchSpecName, null);
            } finally {
                ec.unlock();
            }
        }
        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.