Examples of parentEntity()


Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

  protected boolean isInherited(EOAttribute attribute) {
    boolean inherited = false;
    EOEntity parentEntity = attribute.entity().parentEntity();
    while (!inherited && parentEntity != null) {
      inherited = (parentEntity.attributeNamed(attribute.name()) != null);
      parentEntity = parentEntity.parentEntity();
    }
    return inherited;
  }

  protected void fixDuplicateSingleTableInheritanceDropStatements(EOSynchronizationFactory syncFactory, NSMutableDictionary flags, StringBuffer sqlBuffer) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

  protected boolean isInherited(EOAttribute attribute) {
    boolean inherited = false;
    EOEntity parentEntity = attribute.entity().parentEntity();
    while (!inherited && parentEntity != null) {
      inherited = (parentEntity.attributeNamed(attribute.name()) != null);
      parentEntity = parentEntity.parentEntity();
    }
    return inherited;
  }

  protected void fixDuplicateSingleTableInheritanceDropStatements(EOSynchronizationFactory syncFactory, NSMutableDictionary flags, StringBuffer sqlBuffer) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

    //AK: should use clientProperties from EM
    if (attributeNames == null) {
      EOEntity currentEntity = entity;
      while (attributeNames == null && currentEntity != null) {
        attributeNames = (NSArray<String>)ERXProperties.arrayForKey("er.ajax.json." + currentEntity.name() + ".attributes");
        currentEntity = currentEntity.parentEntity();
      }
      if (attributeNames == null) {
        //publicAttributes = source.attributeKeys();
        //publicAttributeSet.addObjectsFromArray(publicAttributes);
        //NSArray classProperties = entity.classPropertyNames();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

    //AK: should use clientProperties from EM
    if (writableNames == null) {
      EOEntity currentEntity = entity;
      while (writableNames == null && currentEntity != null) {
        writableNames = (NSArray<String>)ERXProperties.arrayForKey("er.ajax.json." + currentEntity.name() + ".writableAttributes");
        currentEntity = currentEntity.parentEntity();
      }
      if (writableNames == null) {
        //publicAttributes = source.attributeKeys();
        //publicAttributeSet.addObjectsFromArray(publicAttributes);
        //NSArray classProperties = entity.classPropertyNames();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

    NSArray<String> relationshipNames = EOEnterpriseObjectSerializer.includedRelationshipNames.objectForKey(entity.name());
    if (relationshipNames == null) {
      EOEntity currentEntity = entity;
      while (relationshipNames == null && currentEntity != null) {
        relationshipNames = (NSArray<String>)ERXProperties.arrayForKey("er.ajax.json." + currentEntity.name() + ".relationships");
        currentEntity = currentEntity.parentEntity();
      }
      if (relationshipNames == null) {
        relationshipNames = entity.classDescriptionForInstances().toOneRelationshipKeys();
      }
      EOEnterpriseObjectSerializer.includedRelationshipNames.setObjectForKey(relationshipNames, entity.name());
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

    if (changedEntityName.equals(_entityName)) {
      relevant = true;
    }
    else if (_deep) {
      EOEntity changedEntity = ERXEOAccessUtilities.entityNamed(editingContext, changedEntityName);
      for (EOEntity parent = changedEntity.parentEntity(); !relevant && parent != null; parent = parent.parentEntity()) {
        relevant = changedEntityName.equals(parent.name());
      }
    }
    return relevant;
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

    return _factory;
  }

  private NSDictionary primaryKeyDictionary(String entityName) {
    EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
    while (entity.parentEntity() != null) {
      entity = entity.parentEntity();
    }
    entityName = entity.name();
    if(entity.primaryKeyAttributeNames().count() != 1) {
      throw new IllegalArgumentException("Can handle only entities with one PK: " + entityName + " has " + entity.primaryKeyAttributeNames());
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

  }

  private NSDictionary primaryKeyDictionary(String entityName) {
    EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
    while (entity.parentEntity() != null) {
      entity = entity.parentEntity();
    }
    entityName = entity.name();
    if(entity.primaryKeyAttributeNames().count() != 1) {
      throw new IllegalArgumentException("Can handle only entities with one PK: " + entityName + " has " + entity.primaryKeyAttributeNames());
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

     *
     * @return the root entity from the EOEnterpriseObject
     */
    public static EOEntity rootEntity(EOEnterpriseObject eo) {
        EOEntity entity = ERXEOAccessUtilities.entityForEo(eo);
        while (entity.parentEntity() != null) {
            entity = entity.parentEntity();
        }
        return entity;
    }

View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.parentEntity()

     * @return the root entity from the EOEnterpriseObject
     */
    public static EOEntity rootEntity(EOEnterpriseObject eo) {
        EOEntity entity = ERXEOAccessUtilities.entityForEo(eo);
        while (entity.parentEntity() != null) {
            entity = entity.parentEntity();
        }
        return entity;
    }

    /** Caches the string attribute keys on a per entity name basis */
 
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.