Examples of ObjectField


Examples of com.psddev.dari.db.ObjectField

            for (ObjectIndex index : struct.getIndexes()) {
                indexedFields.addAll(index.getFields());
            }

            for (Iterator<ObjectField> i = fields.iterator(); i.hasNext();) {
                ObjectField field = i.next();
                String declaring = field.getJavaDeclaringClassName();

                if (declaring != null &&
                        declaring.startsWith("com.psddev.dari.db.")) {
                    continue;
                }

                String fieldName = field.getInternalName();
                boolean embedded = field.isEmbedded();

                if (!embedded &&
                        ObjectField.RECORD_TYPE.equals(field.getInternalItemType())) {
                    embedded = true;

                    for (ObjectType t : field.getTypes()) {
                        if (!t.isEmbedded()) {
                            embedded = false;
                            break;
                        }
                    }
                }

                if (embedded) {
                    for (ObjectType t : field.getTypes()) {
                        addPathedFields(pathedFields, copyConcatenate(prefix, field), t);
                    }

                } else if (indexedFields.contains(fieldName) &&
                        !field.isDeprecated() &&
                        !field.as(ToolUi.class).isHidden()) {
                    pathedFields.add(new PathedField(copyConcatenate(prefix, field)));
                }
            }
        }
View Full Code Here

Examples of com.psddev.dari.db.ObjectField

            }
        }

        query.setPredicate(predicate);

        ObjectField sortField = getSortField();
        if (ObjectField.DATE_TYPE.equals(sortField.getInternalItemType())) {
            query.sortDescending(sortField.getInternalName());
        } else {
            query.sortAscending(sortField.getInternalName());
        }

        return query;
    }
View Full Code Here

Examples of com.psddev.dari.db.ObjectField

    }

    public ObjectField getSortField() {
        if (sortField == null) {
            ObjectType type = getQueryType();
            ObjectField newSortField = null;

            for (ObjectField field : getSortableFields()) {
                if (field.getInternalName().equals(getSortFieldName())) {
                    newSortField = field;
                    break;
View Full Code Here

Examples of com.psddev.dari.db.ObjectField

            marker.append("<span style=\"display: none;\"");

            ObjectType type = state.getType();

            if (type != null) {
                ObjectField field = type.getField(name);

                if (field != null) {
                    String fieldType = field.getInternalType();

                    if (ObjectField.TEXT_TYPE.equals(fieldType)) {
                        Object value = state.get(name);

                        marker.append(" data-cms-field-text=\"");
View Full Code Here

Examples of org.apache.isis.object.reflect.ObjectField

  private static final Logger LOG = LoggerFactory.getLogger(ScheduleBlockView.class);

  public View createView(Content content, ViewAxis axis) {
      ObjectSpecification nc = ((ObjectContent) content).getObject().getSpecification();
      ObjectField[] flds = nc.getFields();
      ObjectField timePeriodField = null;
      ObjectField colorField = null;
      for (int i = 0; i < flds.length; i++) {
      ObjectField field = flds[i];
      if(field.getType().isOfType(Isis.getSpecificationLoader().loadSpecification(TimePeriod.class))) {
        LOG.debug("found TimePeriod field " + field);
        timePeriodField = field;
      }
      if(field.getType().isOfType(Isis.getSpecificationLoader().loadSpecification(org.apache.isis.application.value.Color.class))) {
        LOG.debug("found Color field " + field);
        colorField = field;
      }
    }
      if(timePeriodField == null) {
View Full Code Here

Examples of org.apache.isis.object.reflect.ObjectField

    public Size getRequiredSize(View view) {
    return new Size(155, 400);
  }
   
    public void layout(View view) {
        ObjectField field = null;
        int x = 0;
        Size size = view.getSize();
        size.contract(view.getPadding());

        int width = size.getWidth();
        int maxHeight = size.getHeight();

        View[] views = view.getSubviews();

        for (int i = 0; i < views.length; i++) {
            View v = views[i];
            ObjectAdapter object = ((ObjectContent) v.getContent()).getObject();

            if (field == null) {
                ObjectSpecification nc = object.getSpecification();
                ObjectField[] fields = nc.getFields();

                for (int j = 0; j < fields.length; j++) {
                    field = fields[j];

                    if (field.getType().isOfType(Isis.getSpecificationLoader().loadSpecification(TimePeriod.class))) {
                        break;
                    }
                }
            }
View Full Code Here

Examples of org.apache.isis.object.reflect.ObjectField

  private static final Logger LOG = Logger.getLogger(ScheduleBlockView.class);

  public View createView(Content content, ViewAxis axis) {
      ObjectSpecification nc = ((ObjectContent) content).getObject().getSpecification();
      ObjectField[] flds = nc.getFields();
      ObjectField timePeriodField = null;
      ObjectField colorField = null;
      for (int i = 0; i < flds.length; i++) {
      ObjectField field = flds[i];
      if(field.getType().isOfType(Isis.getSpecificationLoader().loadSpecification(TimePeriod.class))) {
        LOG.debug("found TimePeriod field " + field);
        timePeriodField = field;
      }
      if(field.getType().isOfType(Isis.getSpecificationLoader().loadSpecification(org.apache.isis.application.value.Color.class))) {
        LOG.debug("found Color field " + field);
        colorField = field;
      }
    }
      if(timePeriodField == null) {
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.