Examples of classProperties()


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

        if (result==null) {
            EOEntity entity=ERXEOAccessUtilities.entityNamed(ec, entityName);
            NSMutableArray attList=new NSMutableArray();
            _attributeKeysPerEntityName.setObjectForKey(attList,entityName);
            result=attList;
            for (Enumeration e=entity.classProperties().objectEnumerator();e.hasMoreElements();) {
                Object property=e.nextElement();
                if (property instanceof EOAttribute) {
                    EOAttribute a=(EOAttribute)property;
                    if (a.className().equals("java.lang.String"))
                        attList.addObject(a.name());
View Full Code Here

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

     */
    public static <T extends ERXCopyable<T>> void referenceCopyClassRelationships(T source, T destination) {
      ERXCopyable.copyLogger.debug("Reference copying relationships for  " + source);
      EOEntity entity = EOUtilities.entityForObject(source.editingContext(), source);
      for (EORelationship relationship : classRelationships(entity)) {
        if (entity.classProperties().containsObject(relationship)) {
          Utility.referenceCopyRelationship(source, destination, relationship);
        }
      }
    }

View Full Code Here

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

     */
    public static <T extends ERXCopyable<T>> void referenceCopyToOneClassRelationships(T source, T destination) {
      ERXCopyable.copyLogger.debug("Reference copying all to-one relationships for  " + source.userPresentableDescription());
      EOEntity entity = Utility.entity(source);
      for (EORelationship relationship : classRelationships(entity)) {
        boolean isClassProperty = entity.classProperties().containsObject(relationship);
        if (!relationship.isToMany() && isClassProperty) {
          Utility.referenceCopyToOneRelationship(source, destination, relationship);
        }
      }
    }
View Full Code Here

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

     */
    public static <T extends ERXCopyable<T>> void referenceCopyToManyClassRelationships(T source, T destination) {
      ERXCopyable.copyLogger.debug("Reference copying all to-many relationships for  " + source.userPresentableDescription());
      EOEntity entity = Utility.entity(source);
      for (EORelationship relationship : classRelationships(entity)) {
        boolean isClassProperty = entity.classProperties().containsObject(relationship);
        if (relationship.isToMany() && isClassProperty) {
          Utility.referenceCopyToManyRelationship(source, destination, relationship);
        }
      }
    }
View Full Code Here

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

      T copy = Utility.newInstance(source);

      // Register this object right away to handle circular relationships
      copiedObjects.setObjectForKey(copy, Utility.globalIDForObject(source));

      for (EOProperty property : entity.classProperties()) {
        if (property instanceof EOAttribute) {
          EOAttribute attribute = (EOAttribute) property;
          if (exposedPKAndFKAttributes(source).containsObject(attribute)) {
            copy.takeStoredValueForKey(null, attribute.name());
          }
View Full Code Here

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

            if (attrib != null) {
                Object val = changedValues.objectForKey(key);
                if(ERXValueUtilities.isNull(val)) {
                  val = null;
                }
                if (entity.classProperties().containsObject(attrib)) {
                    eo.takeValueForKey(val, key);
                }
                NSArray relsUsingAttrib = ERXEOAccessUtilities.relationshipsForAttribute(entity, attrib);
                relationships.addObjectsFromArray(relsUsingAttrib);
            } else {
View Full Code Here

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

    relationship.setDeleteRule(deleteRule);
    relationship.setIsMandatory(isMandatory);
    // finally set definition (only will work if assigned to entity!)
    relationship.setDefinition(definition);
    if (isClassProperty) {
      NSMutableArray<EOProperty> classProperties = sourceEntity.classProperties().mutableClone();
      classProperties.addObject(relationship);
      sourceEntity.setClassProperties(classProperties);
    }
    if(log.isDebugEnabled())
        log.debug(relationship + ", flattened:" + relationship.isFlattened() + ", definition:" + relationship.definition() + ", relationshipPath:" + relationship.relationshipPath());
View Full Code Here

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

      } else if(property instanceof EORelationship) {
        entity = ((EORelationship)property).entity();
      } else {
        throw new IllegalArgumentException("property must be an EOAttribute or an EORelationship.");
      }
      NSArray<EOProperty> classProperties = entity.classProperties();
      if(isClassProperty && !classProperties.contains(property)) {
        classProperties = classProperties.arrayByAddingObject(property);
        entity.setClassProperties(classProperties);
      } else if(!isClassProperty && classProperties.contains(property)) {
        classProperties = ERXArrayUtilities.arrayMinusObject(classProperties, property);
View Full Code Here

Examples of org.jboss.managed.api.annotation.ManagementObject.classProperties()

      {
         propertyType = managementObject.properties();
         if(propertyType == ManagementProperties.CLASS || propertyType == ManagementProperties.CLASS_AND_EXPLICIT)
         {
            classProperties = new HashSet<String>();
            for(ManagementProperty mp : managementObject.classProperties())
            {
               if(mp.name().length() > 0)
                  classProperties.add(mp.name());
               if(mp.mappedName().length() > 0)
                  classProperties.add(mp.mappedName());
View Full Code Here

Examples of org.jboss.managed.api.annotation.ManagementObject.classProperties()

      {
         propertyType = managementObject.properties();
         if(propertyType == ManagementProperties.CLASS || propertyType == ManagementProperties.CLASS_AND_EXPLICIT)
         {
            classProperties = new HashSet<String>();
            for(ManagementProperty mp : managementObject.classProperties())
            {
               if(mp.name().length() > 0)
                  classProperties.add(mp.name());
               if(mp.mappedName().length() > 0)
                  classProperties.add(mp.mappedName());
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.