Examples of DerivedDbAttribute


Examples of org.apache.cayenne.map.DerivedDbAttribute

        }
    }

    static class DerivedDbAttributeFactory extends ObjAttributeFactory {
        protected Object create(String name, Object namingContext) {
            return new DerivedDbAttribute(
                name,
                TypesMapping.NOT_DEFINED,
                (DbEntity) namingContext,
                DerivedDbAttribute.ATTRIBUTE_TOKEN);
        }
View Full Code Here

Examples of org.apache.cayenne.map.DerivedDbAttribute

    /**
     * @deprecated since 3.0M2 (scheduled for removal in 3.0M3)
     */
    static class DerivedDbAttributeFactory extends ObjAttributeFactory {
        protected Object create(String name, Object namingContext) {
            return new DerivedDbAttribute(
                name,
                TypesMapping.NOT_DEFINED,
                (DbEntity) namingContext,
                DerivedDbAttribute.ATTRIBUTE_TOKEN);
        }
View Full Code Here

Examples of org.apache.cayenne.map.DerivedDbAttribute

        if (attribute.getType() == TypesMapping.NOT_DEFINED) {
            validator.registerWarning("DbAttribute has no type.", path);
        }

        if (attribute instanceof DerivedDbAttribute) {
            DerivedDbAttribute derived = (DerivedDbAttribute) attribute;
            int paramCount = derived.getParams().size();

            String spec = derived.getExpressionSpec();
            int paramsExpected = 0;
            if (spec != null) {
                // count tokens
                int ind = -DerivedDbAttribute.ATTRIBUTE_TOKEN.length();
                while ((ind = spec.indexOf(DerivedDbAttribute.ATTRIBUTE_TOKEN, ind
View Full Code Here

Examples of org.apache.cayenne.map.DerivedDbAttribute

        if (attribute.getType() == TypesMapping.NOT_DEFINED) {
            validator.registerWarning("DbAttribute has no type.", path);
        }

        if (attribute instanceof DerivedDbAttribute) {
            DerivedDbAttribute derived = (DerivedDbAttribute) attribute;
            int paramCount = derived.getParams().size();

            String spec = derived.getExpressionSpec();
            int paramsExpected = 0;
            if (spec != null) {
                // count tokens
                int ind = -DerivedDbAttribute.ATTRIBUTE_TOKEN.length();
                while ((ind = spec.indexOf(DerivedDbAttribute.ATTRIBUTE_TOKEN, ind
View Full Code Here

Examples of org.apache.cayenne.map.DerivedDbAttribute

      default: return "";
    }
  }

  public Object getValueAt(int row, int column) {
    DerivedDbAttribute attr = (DerivedDbAttribute)getAttribute(row);

    if (attr == null) {
      return "";
    }
View Full Code Here

Examples of org.apache.cayenne.map.DerivedDbAttribute

        return "";
    }
  }
 
  public void setUpdatedValueAt(Object newVal, int row, int col) {
    DerivedDbAttribute attr = (DerivedDbAttribute)getAttribute(row);
    if (attr == null) {
      return;
    }

    AttributeEvent e = new AttributeEvent(eventSource, attr, entity);

    switch (col) {
      case DB_ATTRIBUTE_NAME :
        e.setOldName(attr.getName());
        setAttributeName((String) newVal, attr);
        fireTableCellUpdated(row, col);
        break;
      case DB_ATTRIBUTE_SPEC :
        setSpec((String) newVal, attr);
View Full Code Here

Examples of org.apache.cayenne.map.DerivedDbAttribute

        }
    }

    static class DerivedDbAttributeFactory extends ObjAttributeFactory {
        protected Object create(String name, Object namingContext) {
            return new DerivedDbAttribute(
                name,
                TypesMapping.NOT_DEFINED,
                (DbEntity) namingContext,
                DerivedDbAttribute.ATTRIBUTE_TOKEN);
        }
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.