Package com.webobjects.eoaccess

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


    String result = null;
    if (classDescription instanceof EOEntityClassDescription) {
      EOEntity entity = ((EOEntityClassDescription) classDescription).entity();
      while (entity != null && result == null) {
        result = localizedStringForKey(entity.name() + "." + key);
        entity = entity.parentEntity();
      }
    }
    if (result == null) {
      // fallback
      result = localizedDisplayNameForKey(classDescription.entityName(), key);
View Full Code Here


        EOEntity parent = entityNamed(parentName);
        for (Enumeration childrenEnumerator = children.objectEnumerator(); childrenEnumerator.hasMoreElements();) {
          String childName = (String) childrenEnumerator.nextElement();
          EOEntity child = entityNamed(childName);

          if (child.parentEntity() != parent && !parent.subEntities().containsObject(child)) {
            log.debug("Found entity: " + child.name() + " which should have: " + parent.name() + " as it's parent.");
            parent.addSubEntity(child);
          }
        }
      }
View Full Code Here

                  String lowercaseTableName = entity.externalName().toLowerCase();
                    if (tableName.equals(lowercaseTableName))
                  {
                      // Prefer the parent entity as long as it is using the same table
                        EOEntity root = entity;
                        while (root.parentEntity() != null &&
                             lowercaseTableName.equalsIgnoreCase(root.parentEntity().externalName()))
                            root = root.parentEntity();
                        if (! possibleEntities.containsObject(root))
                          possibleEntities.addObject(root);
                  }
View Full Code Here

                    if (tableName.equals(lowercaseTableName))
                  {
                      // Prefer the parent entity as long as it is using the same table
                        EOEntity root = entity;
                        while (root.parentEntity() != null &&
                             lowercaseTableName.equalsIgnoreCase(root.parentEntity().externalName()))
                            root = root.parentEntity();
                        if (! possibleEntities.containsObject(root))
                          possibleEntities.addObject(root);
                  }
              }
View Full Code Here

                  {
                      // Prefer the parent entity as long as it is using the same table
                        EOEntity root = entity;
                        while (root.parentEntity() != null &&
                             lowercaseTableName.equalsIgnoreCase(root.parentEntity().externalName()))
                            root = root.parentEntity();
                        if (! possibleEntities.containsObject(root))
                          possibleEntities.addObject(root);
                  }
              }
            }
View Full Code Here

     * @deprecated use {@link er.extensions.eof.ERXEOAccessUtilities#rootEntityForEntity(EOEntity)} instead
     */
    @Deprecated
    public static EOEntity rootParentEntityForEntity(EOEntity entity) {
        EOEntity root = entity;
        while (root!=null && root.parentEntity() != null)
            root = root.parentEntity();
        return root;
    }
   
    /** caches date formatter the first time it is used */
 
View Full Code Here

     */
    @Deprecated
    public static EOEntity rootParentEntityForEntity(EOEntity entity) {
        EOEntity root = entity;
        while (root!=null && root.parentEntity() != null)
            root = root.parentEntity();
        return root;
    }
   
    /** caches date formatter the first time it is used */
    @Deprecated
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.