Package com.webobjects.eoaccess

Examples of com.webobjects.eoaccess.EOAttribute.columnName()


              // Then deal with our end of things
              for (Enumeration attributeEnumerator = relationship.sourceAttributes().objectEnumerator(); attributeEnumerator.hasMoreElements(); ) {
                EOAttribute attribute = (EOAttribute)attributeEnumerator.nextElement();
                if( (! this.isSinglePrimaryKeyAttribute(attribute)) && (columnNameDictionary.objectForKey(tableName + "." + attribute.columnName()) != null) ) {
                  columnNameDictionary.setObjectForKey(attribute.columnName(), tableName + "." + attribute.columnName());
                  EOSQLExpression expression = this._expressionForString("create index " + tableName + " " + attribute.columnName());
                  if(expression != null) primaryKeyConstraintExpressions.addObject( expression );
                }
              }
              // Then deal with the other side
              if(entity.model() == relationship.destinationEntity().model()) {
View Full Code Here


          }
          succeeded = true;
        } catch (JDBCAdaptorException e) {
          // jw check if H2 has already a sequence with a different name
          String tableName = entity.externalName().toUpperCase();
          String columnName = attribute.columnName().toUpperCase();
          int dotIndex = tableName.indexOf(".");
          if (dotIndex == -1) {
            expression.setStatement("select SEQUENCE_NAME, COLUMN_DEFAULT from INFORMATION_SCHEMA.COLUMNS where UPPER(TABLE_NAME) = '"
                + tableName + "' and UPPER(COLUMN_NAME) = '" + columnName + "'");
          } else {
View Full Code Here

        NSArray nsarray1 = eoentity.attributes();
        int l = nsarray1 != null ? nsarray1.count() : 0;

        for (int k = 0; k < l; k++) {
          EOAttribute eoattribute = (EOAttribute) nsarray1.objectAtIndex(k);
          String column = eoattribute.columnName();

          if (!eoattribute.isDerived() && !eoattribute.isFlattened() && column != null && column.length() > 0 && nsmutablearray.indexOfObject(column) == NSArray.NotFound) {

            if (columns.length() > 0) {
              columns.append(',');
View Full Code Here

      }

      NSMutableArray<String> columns = new NSMutableArray<String>();
      for (int i = attributes.length; i-- > 0;) {
        EOAttribute att = attributes[i];
        String column = att.columnName();
        if (!ERXStringUtilities.stringIsNullOrEmpty(column)) {
          if (quoteNames) {
            columns.addObject("\"" + column + "\"");
          }
          else {
View Full Code Here

    protected EOAttribute[] attributesArray(NSArray<EOAttribute> array) {
      NSMutableArray<EOAttribute> attributes = new NSMutableArray<EOAttribute>();
      for (int i = 0; i < array.count(); i++) {
        EOAttribute att = array.objectAtIndex(i);
        if (!ERXStringUtilities.stringIsNullOrEmpty(att.columnName())) {
          attributes.addObject(att);
        }
      }

      EOAttribute[] result = new EOAttribute[attributes.count()];
View Full Code Here

      for (Iterator entityIterator = entityGroup.iterator(); entityIterator.hasNext();) {
        EOEntity entity = (EOEntity) entityIterator.next();
        Iterator attributeIterator = entity.attributes().iterator();
        while (attributeIterator.hasNext()) {
          EOAttribute attribute = (EOAttribute) attributeIterator.next();
          String columnName = attribute.columnName();
          if (!attribute.isDerived() && !attribute.isFlattened() && columnName != null && columnName.length() > 0 && !columnNames.contains(columnName)) {
            sqlExpr.appendItemToListString(_columnCreationClauseForAttribute(attribute), aStatement);
            columnNames.addObject(columnName);
          }
        }
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.