Examples of primaryKeyAttributeNames()


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

        return ERXProperties.booleanForKey("er.corebusinesslogic.ERCoreBusinessLogic.ShouldMailExceptions");
    }
   
    public void addPreferenceRelationshipToActorEntity(String entityName) {
        EOEntity entity  = EOModelGroup.defaultGroup().entityNamed(entityName);
        if(entity != null && entity.primaryKeyAttributeNames().count() == 1) {
            addPreferenceRelationshipToActorEntity(entityName, entity.primaryKeyAttributeNames().lastObject());
        } else {
            throw new IllegalArgumentException("Entity is not suitable: " + entityName);
        }
    }
View Full Code Here

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

    }
   
    public void addPreferenceRelationshipToActorEntity(String entityName) {
        EOEntity entity  = EOModelGroup.defaultGroup().entityNamed(entityName);
        if(entity != null && entity.primaryKeyAttributeNames().count() == 1) {
            addPreferenceRelationshipToActorEntity(entityName, entity.primaryKeyAttributeNames().lastObject());
        } else {
            throw new IllegalArgumentException("Entity is not suitable: " + entityName);
        }
    }
   
View Full Code Here

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

    /* (non-Javadoc)
     * @see er.extensions.ERXEnterpriseObject#primaryKeyAttributeNames()
     */
    public NSArray primaryKeyAttributeNames() {
        EOEntity entity = ERXEOAccessUtilities.entityNamed(editingContext(), entityName());
        return entity.primaryKeyAttributeNames();
    }

   
    /** caches the primary key dictionary for the given object */
    private NSDictionary _primaryKeyDictionary;
View Full Code Here

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

     */
    protected static String primaryKeyNameForObjects(NSArray eos) {
        validateObjects(eos);
        EOEnterpriseObject eo = (EOEnterpriseObject)eos.lastObject();
        EOEntity entity = ((EOEntityClassDescription)eo.classDescription()).entity();
        if (entity.primaryKeyAttributeNames().count() != 1)
            throw new IllegalStateException("Attempting to construct a qualifier for an entity with a compound primary key: " + entity);
        return entity.primaryKeyAttributeNames().lastObject();
    }

    /**
 
View Full Code Here

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

        validateObjects(eos);
        EOEnterpriseObject eo = (EOEnterpriseObject)eos.lastObject();
        EOEntity entity = ((EOEntityClassDescription)eo.classDescription()).entity();
        if (entity.primaryKeyAttributeNames().count() != 1)
            throw new IllegalStateException("Attempting to construct a qualifier for an entity with a compound primary key: " + entity);
        return entity.primaryKeyAttributeNames().lastObject();
    }

    /**
     * Simple validation routine used to ensure that
     * the objects being passed in are enterprise
View Full Code Here

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

    @Override
    public NSArray<EOSQLExpression> primaryKeyConstraintStatementsForEntityGroup(NSArray<EOEntity> entityGroup) {
      if (entityGroup.count() != 0) {
        EOEntity entity = entityGroup.objectAtIndex(0);
        String tableName = entity.externalName();
        NSArray<String> keys = entity.primaryKeyAttributeNames();
        StringBuilder sql = new StringBuilder();

        if (tableName != null && keys.count() > 0) {
          sql.append("ALTER TABLE ");
          sql.append(quoteTableName(tableName.toUpperCase()));
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.