Examples of classDescriptionForInstances()


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

        //ak: this check could be better...but anyway, as we edit, we should get a peer context
        if(lpi instanceof ERD2WEditableListPage) {
            ec = ERXEC.newEditingContext(session().defaultEditingContext().parentObjectStore());
        }
        EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
        EODataSource ds = relationshipArrayFromRequest(ec, entity.classDescriptionForInstances());
        if(ds == null) {
            ds = new EODatabaseDataSource(ec, entityName);
            EOFetchSpecification fs = fetchSpecificationFromRequest(entityName);
            if(fs == null) {
                fs = new EOFetchSpecification(entityName, null, null);
View Full Code Here

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

   
    public NSArray<String> attributes() {
        NSMutableArray<String> result = new NSMutableArray<String>();
        EOEntity entity = entity();
        for (String key : (NSArray<String>)displayPropertyKeys()) {
            if(entity.classDescriptionForInstances().attributeKeys().containsObject(key) && entity.classPropertyNames().containsObject(key)) {
                result.addObject(key);
            }
        }
        return result;
    }
View Full Code Here

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

   
    public NSArray<String> toOneRelationships() {
        NSMutableArray<String> result = new NSMutableArray<String>();
        EOEntity entity = entity();
        for (String key : (NSArray<String>)displayPropertyKeys()) {
            if(entity.classDescriptionForInstances().toOneRelationshipKeys().containsObject(key) && entity.classPropertyNames().containsObject(key)) {
                result.addObject(key);
            }
        }
        return result;
    }
View Full Code Here

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

   
    public NSArray<String> toManyRelationships() {
        NSMutableArray<String> result = new NSMutableArray<String>();
        EOEntity entity = entity();
        for (String key : (NSArray<String>)displayPropertyKeys()) {
            if(entity.classDescriptionForInstances().toManyRelationshipKeys().containsObject(key) && entity.classPropertyNames().containsObject(key)) {
                result.addObject(key);
            }
        }
        return result;
    }
View Full Code Here

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

                         entity = rel.destinationEntity();
                         prefix += part + ".";
                     }
                 }
                     if(entity.attributeNamed(attributeName) == null) {
                       EOClassDescription cd = entity.classDescriptionForInstances();
                         if(cd instanceof ERXEntityClassDescription) {
                           String localizedKey = ((ERXEntityClassDescription)cd).localizedKey(attributeName);
                           if(localizedKey != null) {
                                 item = new EOSortOrdering(prefix + localizedKey, item.selector());
                           }
View Full Code Here

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

            if (partialsForEntity == null) {
              partialsForEntity = new NSMutableArray<Class<ERXPartial>>();
              _partialsForEntity.setObjectForKey(partialsForEntity, partialEntity);
            }
            Class<ERXPartial> partialClass = (Class<ERXPartial>) _NSUtilities.classWithName(partialExtensionEntity.className());
            ERXEntityClassDescription ecd = (ERXEntityClassDescription) partialEntity.classDescriptionForInstances();
            ecd._addPartialClass(partialClass);
            partialsForEntity.addObject(partialClass);
            baseForPartial.setObjectForKey(partialEntity, partialExtensionEntity);
          }
        }
View Full Code Here

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

     * Creates a new Custom Object for the specified entity, inserts it into the receiver using <code>insertSavedObject</code>, and returns the new object.
     * @param  anEntityName  the name of entity
     */
    public EOCustomObject createSavedObject(final String anEntityName) {
        EOEntity entity = EOUtilities.entityNamed(this, anEntityName);
        EOEnterpriseObject object = entity.classDescriptionForInstances().createInstanceWithEditingContext(this, null);
        if (!(object instanceof EOCustomObject))
            throw new IllegalArgumentException("The entity is not an EOCustomObject and can't be used with createSavedObject().");
        insertSavedObject((EOCustomObject)object);
        return (EOCustomObject)object;
    }
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.