Examples of entityName()


Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

            }
            else if (nonModelClassDescription instanceof BeanInfoClassDescription && ((BeanInfoClassDescription) nonModelClassDescription).isToOneMethod(keyName)) {
              _addToOneRelationshipNodeForKeyInObject(remainingKey, obj, nonModelClassDescription.classDescriptionForDestinationKey(keyName), keyFilter, context, visitedObjects);
            }
            else if (!keyFilter.isUnknownKeyIgnored()) {
              throw new IllegalArgumentException("This key filter specified that the key '" + keyName + "' should be included on '" + nonModelClassDescription.entityName() + "', but it does not exist.");
            }
          }
        }
        else if (classDescription instanceof BeanInfoClassDescription) {
          BeanInfoClassDescription beanInfoClassDescription = (BeanInfoClassDescription) classDescription;
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

  public static ERXRestRequestNode requestNodeWithObjectAndFilter(Object obj, ERXKeyFilter keyFilter, ERXRestContext context) {
    String shortName = null;
    EOClassDescription classDescription = null;
    if (obj != null) {
      classDescription = ERXRestClassDescriptionFactory.classDescriptionForObject(obj, false);
      shortName = classDescription.entityName();
    }
    ERXRestRequestNode requestNode = new ERXRestRequestNode(shortName, true);
    if (ERXRestUtils.isPrimitive(obj)) {
      requestNode.setValue(obj);
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

    for (String toOneRelationshipName : classDescription.toOneRelationshipKeys()) {
      ERXKey<Object> key = new ERXKey<Object>(toOneRelationshipName);
      if (filter.matches(key, ERXKey.Type.ToOneRelationship)) {
        EOClassDescription destinationClassDescription = classDescription.classDescriptionForDestinationKey(key.key());
        ERXKeyFilter destinationFilter = filter._filterForKey(key);
        NSDictionary<String, Object> destinationSchema = ERXRestSchema.schemaPropertiesForEntityNamed(destinationClassDescription.entityName(), destinationFilter, entities);
        if (destinationSchema != null) {
          properties.setObjectForKey(destinationSchema, key.key());
        }
        else {
          // MS: Recursive reference to an entity .... wtf do we do.
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

    for (String toManyRelationshipName : classDescription.toManyRelationshipKeys()) {
      ERXKey<Object> key = new ERXKey<Object>(toManyRelationshipName);
      if (filter.matches(key, ERXKey.Type.ToManyRelationship)) {
        EOClassDescription destinationClassDescription = classDescription.classDescriptionForDestinationKey(key.key());
        ERXKeyFilter destinationFilter = filter._filterForKey(key);
        NSDictionary<String, Object> destinationSchema = ERXRestSchema.schemaPropertiesForEntityNamed(destinationClassDescription.entityName(), destinationFilter, entities);
        if (destinationSchema != null) {
          properties.setObjectForKey(destinationSchema, key.key());
        }
        else {
          // MS: Recursive reference to an entity .... wtf do we do.
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

    return false;
  }
 
  public String destinationEntityName() {
    EOClassDescription destinationClassDescription = object().classDescriptionForDestinationKey(key());
    String destinationEntityName = destinationClassDescription.entityName();
    return destinationEntityName;
  }

  public NSDictionary<String, Object> settings() {
    String pageConfiguration = d2wContext().dynamicPage();
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

   * to 'create'
   */
  public WOComponent newObjectAction() {
    EOEditingContext newEc = ERXEC.newEditingContext(masterObject().editingContext());
    EOClassDescription relatedObjectClassDescription = masterObject().classDescriptionForDestinationKey(relationshipKey());
    EOEnterpriseObject relatedObject = EOUtilities.createAndInsertInstance(newEc, relatedObjectClassDescription.entityName());
    EOEnterpriseObject localObj = EOUtilities.localInstanceOfObject(relatedObject.editingContext(), masterObject());
    if (localObj instanceof ERXGenericRecord) {
      ((ERXGenericRecord)localObj).setValidatedWhenNested(false);
    }
    localObj.addObjectToBothSidesOfRelationshipWithKey(relatedObject, relationshipKey());
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

    return super.key();
  }

  public String destinationEntityName() {
    EOClassDescription relatedObjectClassDescription = object().classDescriptionForDestinationKey(key());
    String relationshipEntityName = relatedObjectClassDescription.entityName();
//    NSLog.out.appendln("***ERMDEditRelationship.destinationEntityName: "
//        + relationshipEntityName +"***");
    return relationshipEntityName;
  }
   
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.entityName()

      String key = keyPathTokenizer.nextToken();
      if (keyPathTokenizer.hasMoreElements()) {
        EOClassDescription sourceClassDescription = classDescription;
        classDescription = sourceClassDescription.classDescriptionForDestinationKey(key);
        if (classDescription == null) {
          throw new IllegalStateException("Invalid key '" + key + "' for entity '" + sourceClassDescription.entityName() + "'.");
        }
      }
      else {
        if (!classDescription.attributeKeys().containsObject(key)) {
          throw new IllegalStateException("Invalid key '" + key + "' for entity '" + classDescription.entityName() + "'.");
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.entityName()

    private NSArray<T> relevantChanges(NSDictionary dict, String key) {
      NSMutableArray<T> releventEOs = null;
        NSArray<EOEnterpriseObject> eos = (NSArray<EOEnterpriseObject>) dict.objectForKey(key);
        for (Enumeration enumeration = eos.objectEnumerator(); enumeration.hasMoreElements();) {
            EOEnterpriseObject eo = (EOEnterpriseObject) enumeration.nextElement();
            if(eo.entityName().equals(entityName())) {
              if (releventEOs == null) {
                releventEOs = new NSMutableArray();
              }
              releventEOs.addObject((T)eo);
            }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.entityName()

            lastKey=key;
        } else {
            String partialKeyPath=KeyValuePath.keyPathWithoutLastProperty(key);
            EOEnterpriseObject objectForPropertyDisplayed=(EOEnterpriseObject)object.valueForKeyPath(partialKeyPath);
            if (objectForPropertyDisplayed!=null) {
                entity=EOModelGroup.defaultGroup().entityNamed(objectForPropertyDisplayed.entityName());
                lastKey=KeyValuePath.lastPropertyKeyInKeyPath(key);
            }
        }
        if (entity!=null && lastKey!=null) {
            Object property=entity.attributeNamed(lastKey);
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.