Examples of EOEntity


Examples of com.webobjects.eoaccess.EOEntity

  public EOQualifier qualifierForRelationshipWithKey(String aKey) {
    willRead();

    if (aKey != null) {
      String anEntityName = entityName();
      EOEntity anEntity = EOModelGroup.defaultGroup().entityNamed(
          anEntityName);
      EORelationship aRelationship = anEntity.relationshipNamed(aKey);

      if (aRelationship != null) {
        EOEditingContext anEditingContext = editingContext();
        EOGlobalID aGlobalID = anEditingContext.globalIDForObject(this);
        String aModelName = anEntity.model().name();
        EODatabaseContext aDatabaseContext = EOUtilities
            .databaseContextForModelNamed(anEditingContext,
                aModelName);
        aDatabaseContext.lock();
        NSDictionary aRow = aDatabaseContext
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity

      findModelProcessor("org.objectstyle.wolips.eomodeler.EOModelProcessor", false);
    }
    if (entityNames == null || entityNames.size() == 0) {
      Enumeration entitiesEnum = _model.entities().objectEnumerator();
      while (entitiesEnum.hasMoreElements()) {
        EOEntity entity = (EOEntity) entitiesEnum.nextElement();
        if (!isPrototype(entity)) {// &&
          // entityUsesSeparateTable(entity))
          // {
          _entities.addObject(entity);
        }
      }
    } else {
      Iterator entityNamesIter = entityNames.iterator();
      while (entityNamesIter.hasNext()) {
        String entityName = (String) entityNamesIter.next();
        EOEntity entity = _model.entityNamed(entityName);
        if (entity != null) {
          _entities.addObject(entity);
        }
      }
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity

    EOModel prototypesModel = null;
    Enumeration modelsEnum = modelGroup.models().objectEnumerator();
    while (modelsEnum.hasMoreElements()) {
      EOModel model = (EOModel) modelsEnum.nextElement();
      EOEntity eoAdaptorPrototypesEntity = _modelGroup.entityNamed("EO" + model.adaptorName() + "Prototypes");
      if (eoAdaptorPrototypesEntity != null) {
        prototypesModel = eoAdaptorPrototypesEntity.model();
        // System.out.println("EOFSQLGenerator.EOFSQLGenerator:
        // removing " + eoAdaptorPrototypesEntity.name() + " from "
        // + prototypesModel.name());
        prototypesModel.removeEntity(eoAdaptorPrototypesEntity);
        removedPrototypeEntities.takeValueForKey(eoAdaptorPrototypesEntity, eoAdaptorPrototypesEntity.name());
      }
    }

    EOEntity eoPrototypesEntity = _modelGroup.entityNamed("EOPrototypes");
    if (eoPrototypesEntity != null) {
      prototypesModel = eoPrototypesEntity.model();
      prototypesModel.removeEntity(eoPrototypesEntity);
      // System.out.println("EOFSQLGenerator.EOFSQLGenerator: removing
      // " + eoPrototypesEntity.name() + " from " +
      // prototypesModel.name());
      removedPrototypeEntities.takeValueForKey(eoPrototypesEntity, eoPrototypesEntity.name());
    }

    EOEntity prototypesEntity = _modelGroup.entityNamed(prototypeEntityName);
    if (prototypesEntity == null) {
      prototypesEntity = (EOEntity) removedPrototypeEntities.valueForKey(prototypeEntityName);
    } else {
      prototypesModel = prototypesEntity.model();
      prototypesModel.removeEntity(prototypesEntity);
    }
    if (prototypesEntity != null && prototypesModel != null) {
      // System.out.println("EOFSQLGenerator.EOFSQLGenerator: setting
      // " + prototypesEntity.name() + " to EOPrototypes in " +
      // prototypesModel.name());
      prototypesEntity.setName(replacementPrototypeName);
      prototypesModel.addEntity(prototypesEntity);
    }

    Enumeration resetModelsEnum = _modelGroup.models().objectEnumerator();
    while (resetModelsEnum.hasMoreElements()) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity

  }

  protected void localizeEntities() {
    Enumeration entitiesEnum = new NSArray(_entities).objectEnumerator();
    while (entitiesEnum.hasMoreElements()) {
      EOEntity entity = (EOEntity) entitiesEnum.nextElement();
      createLocalizedAttributes(entity);
    }
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity

  }

  protected void fixAllowsNullOnSingleTableInheritance() {
    Enumeration entitiesEnum = new NSArray(_entities).objectEnumerator();
    while (entitiesEnum.hasMoreElements()) {
      EOEntity entity = (EOEntity) entitiesEnum.nextElement();
      if (isSingleTableInheritance(entity)) {
        Enumeration attributeEnum = entity.attributes().objectEnumerator();
        while (attributeEnum.hasMoreElements()) {
          EOAttribute attribute = (EOAttribute) attributeEnum.nextElement();
          if (!isInherited(attribute)) {
            attribute.setAllowsNull(true);
          }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity

  }

  protected void ensureSingleTableInheritanceParentEntitiesAreIncluded() {
    Enumeration entitiesEnum = new NSArray(_entities).objectEnumerator();
    while (entitiesEnum.hasMoreElements()) {
      EOEntity entity = (EOEntity) entitiesEnum.nextElement();
      ensureSingleTableInheritanceParentEntitiesAreIncluded(entity);
    }
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity

  }

  protected void ensureSingleTableInheritanceChildEntitiesAreIncluded() {
    Enumeration entitiesEnum = _model.entities().objectEnumerator();
    while (entitiesEnum.hasMoreElements()) {
      EOEntity entity = (EOEntity) entitiesEnum.nextElement();
      if (isSingleTableInheritance(entity)) {
        EOEntity parentEntity = entity.parentEntity();
        if (_entities.containsObject(parentEntity) && !_entities.containsObject(entity)) {
          _entities.addObject(entity);
        }
      }
    }
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

      return;
    }

    super.setInput(part, selection);
    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    EOEntity entity = (EOEntity) selectedObject;
    if (!ComparisonUtils.equals(entity, myEntity)) {
      disposeBindings();

      myEntity = entity;
      if (myEntity != null) {
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

import org.eclipse.jface.viewers.Viewer;
import org.objectstyle.wolips.eomodeler.core.model.EOEntity;

public class EOFetchSpecsContentProvider implements IStructuredContentProvider {
  public Object[] getElements(Object _inputElement) {
    EOEntity entity = (EOEntity) _inputElement;
    Object[] fetchSpecs = entity.getFetchSpecs().toArray();
    return fetchSpecs;
  }
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

      return;
    }
   
    super.setInput(part, selection);
    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    EOEntity entity = (EOEntity) selectedObject;
    if (!ComparisonUtils.equals(entity, myEntity)) {
      disposeBindings();

      myEntity = entity;
      if (myEntity != 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.