if (!clientClassProperties.isEmpty()) {
if (clientClassProperties != null && !clientClassProperties.isEmpty()) {
  public EOModelMap toEntityMap() {    EOModelMap entityMap = myEntityMap.cloneModelMap();    entityMap.setString("name", myName, true); //$NON-NLS-1$    entityMap.setString("externalName", myExternalName, true); //$NON-NLS-1$    entityMap.setString("className", myClassName, true); //$NON-NLS-1$    if (myParent != null) {      entityMap.setString("parent", myParent.getName(), true); //$NON-NLS-1$    }    entityMap.setBoolean("cachesObjects", myCachesObjects); //$NON-NLS-1$    entityMap.setBoolean("isAbstractEntity", myAbstractEntity); //$NON-NLS-1$    entityMap.setBoolean("readOnly", myReadOnly); //$NON-NLS-1$    entityMap.setString("restrictingQualifier", myRestrictingQualifier, true); //$NON-NLS-1$    entityMap.setString("externalQuery", myExternalQuery, true); //$NON-NLS-1$    entityMap.setInteger("maxNumberOfInstancesToBatchFetch", myMaxNumberOfInstancesToBatchFetch); //$NON-NLS-1$    //Map fetchSpecifications = _entityMap.getMap("fetchSpecificationDictionary");    // TODO: ???    Set classProperties = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);    Set primaryKeyAttributes = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);    Set attributesUsedForLocking = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);    Set clientClassProperties = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);    Set attributes = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);    Iterator attributeIter = myAttributes.iterator();    while (attributeIter.hasNext()) {      EOAttribute attribute = (EOAttribute) attributeIter.next();      EOModelMap attributeMap = attribute.toMap();      attributes.add(attributeMap);      if (BooleanUtils.isTrue(attribute.isClassProperty())) {        classProperties.add(attribute.getName());      }      if (BooleanUtils.isTrue(attribute.isPrimaryKey())) {        primaryKeyAttributes.add(attribute.getName());      }      if (BooleanUtils.isTrue(attribute.isUsedForLocking())) {        attributesUsedForLocking.add(attribute.getName());      }      if (BooleanUtils.isTrue(attribute.isClientClassProperty())) {        clientClassProperties.add(attribute.getName());      }    }    entityMap.setSet("attributes", attributes, true); //$NON-NLS-1$    Set relationships = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);    Iterator relationshipIter = myRelationships.iterator();    while (relationshipIter.hasNext()) {      EORelationship relationship = (EORelationship) relationshipIter.next();      EOModelMap relationshipMap = relationship.toMap();      relationships.add(relationshipMap);      if (BooleanUtils.isTrue(relationship.isClassProperty())) {        classProperties.add(relationship.getName());      }    }    entityMap.setSet("relationships", relationships, true); //$NON-NLS-1$    entityMap.setSet("attributesUsedForLocking", attributesUsedForLocking, true); //$NON-NLS-1$    entityMap.setSet("classProperties", classProperties, true); //$NON-NLS-1$    entityMap.setSet("primaryKeyAttributes", primaryKeyAttributes, true); //$NON-NLS-1$    Set sharedObjectFetchSpecificationNames = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);    Iterator fetchSpecsIter = myFetchSpecs.iterator();    while (fetchSpecsIter.hasNext()) {      EOFetchSpecification fetchSpec = (EOFetchSpecification) fetchSpecsIter.next();      if (BooleanUtils.isTrue(fetchSpec.isSharesObjects())) {        sharedObjectFetchSpecificationNames.add(fetchSpec.getName());      }    }    entityMap.setSet("sharedObjectFetchSpecificationNames", sharedObjectFetchSpecificationNames, true); //$NON-NLS-1$    Map internalInfoMap = entityMap.getMap("internalInfo"); //$NON-NLS-1$    if (internalInfoMap == null) {      internalInfoMap = new HashMap();      entityMap.setMap("internalInfo", internalInfoMap, false); //$NON-NLS-1$    }    if (!clientClassProperties.isEmpty()) {      internalInfoMap.put("_clientClassPropertyNames", clientClassProperties); //$NON-NLS-1$    }    entityMap.setMap("userInfo", getUserInfo(), true); //$NON-NLS-1$    return entityMap;  }