Package com.webobjects.eoaccess

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


     */
    public ERDDefaultModelAssignment (String key, Object value) { super(key,value); }
       
    protected int attributeWidthAsInt(D2WContext c) {
        EOAttribute a = (EOAttribute)c.valueForKey("smartAttribute");
        return a!=null ? a.width() : 0;
    }

    protected int smartDefaultAttributeWidthAsInt(D2WContext c) {
        int i=attributeWidthAsInt(c);
        return i<50 ? ( i==0 ? 20 : i ) : 50;       
View Full Code Here


        Class<?> attributeClass = classDescription.classForAttributeKey(key.key());
        if (String.class.isAssignableFrom(attributeClass)) {
          property.setObjectForKey("string", "type");
          if (attribute != null) {
            int width = attribute.width();
            if (width > 0) {
              if (!optional) {
                property.setObjectForKey(1, "minLength");
              }
              property.setObjectForKey(width, "maxLength");
View Full Code Here

      if (isNSData) {
        if (firstPrimaryKeyAttribute.externalType().startsWith("BIT")) {
          sql.append("NEW_UID(" + (firstPrimaryKeyAttribute.width() >> 3) + ")");
        }
        else {
          sql.append("NEW_UID(" + firstPrimaryKeyAttribute.width() + ")");
        }
      }
      else {
        sql.append("SELECT UNIQUE FROM " + quoteTableName(eoentity.primaryKeyRootName()));
      }
View Full Code Here

    StringBuilder sql = new StringBuilder();
    sql.append("VALUES (");
    for (int keyNum = 0; keyNum < keyBatchSize; keyNum++) {
      if (isNSData) {
        if (firstPrimaryKeyAttribute.externalType().startsWith("BIT")) {
          sql.append("NEW_UID(" + (firstPrimaryKeyAttribute.width() >> 3) + ")");
        }
        else {
          sql.append("NEW_UID(" + firstPrimaryKeyAttribute.width() + ")");
        }
      }
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.