Get the Constraints for the specified child component.

@return a Constraints object, never null.
167276
protected Constraints getConstraints (Component child)
    {
        if (_constraints != null) {
            Constraints c = _constraints.get(child);
            if (c != null) {
                return c;
            }
        }

        return DEFAULT_CONSTRAINTS;
    }
170121
public ConstraintType<ParameterType<T>> getOrCreateConstraint()
   {
      List<Node> nodeList = childNode.get("constraint");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ConstraintTypeImpl<ParameterType<T>>(this, "constraint", childNode, nodeList.get(0));
      }
      return createConstraint();
   }
818192
@SuppressWarnings("unchecked")
    @Override
    public Map getConstrainedProperties() {
        verifyContextIsInitialized();
        if(constrainedProperties == null) {
            ConstrainedDiscovery constrainedDiscovery = GrailsFactoriesLoader.loadFactory(ConstrainedDiscovery.class);
            if(constrainedDiscovery == null) {
                constrainedProperties = Collections.emptyMap();
            }
            else {
                constrainedProperties = constrainedDiscovery.findConstrainedProperties(persistentEntity);
            }
        }
        return constrainedProperties;
    }
921937
public PayloadType<ConstraintType<T>> getOrCreatePayload()
   {
      Node node = childNode.getOrCreate("payload");
      PayloadType<ConstraintType<T>> payload = new PayloadTypeImpl<ConstraintType<T>>(this, "payload", childNode, node);
      return payload;
   }
632022
public final ChildSelector<T> element(String localName, ElementConstraint...constraints) {
        return element(new QName(localName), constraints);
    }
1171842
public final ChildSelector<T> element(QName qname, ElementConstraint...constraints) {
        ElementEqualsConstraint nameConstraint = new ElementEqualsConstraint(qname);
        return new ChildSelector<T>(getContext(), getCurrentSelector(), 
                ElementSelector.gatherConstraints(nameConstraint, constraints));
    }
1233054
public final ElementSelector<T> descendant(String localName, ElementConstraint...constraints) {
        return descendant(new QName(localName), constraints);
    }
201728
private static GridBagConstraints getConstraints(int gridx, int gridy, int gridwidth) {
        GridBagConstraints gc = new GridBagConstraints();
        gc.fill = GridBagConstraints.NONE;
        gc.anchor = GridBagConstraints.WEST;
        gc.gridx = gridx;
        gc.gridy = gridy;
        gc.gridwidth = gridwidth;
        return gc;
    }
1238101
public String getSizeConstraint()
    {
        String constraint = getProperty(PropertyHelper.OJB_PROPERTY_LENGTH);

        if ((constraint == null) || (constraint.length() == 0))
        {
            String precision = getProperty(PropertyHelper.OJB_PROPERTY_PRECISION);
            String scale     = getProperty(PropertyHelper.OJB_PROPERTY_SCALE);

            if ((precision == null) || (precision.length() == 0))
            {
                precision = getProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_PRECISION);
            }
            if ((scale == null) || (scale.length() == 0))
            {
                scale = getProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_SCALE);
            }
            if (((precision != null) && (precision.length() > 0)) ||
                ((scale     != null) && (scale.length()     > 0)))
            {
                if ((precision == null) || (precision.length() == 0))
                {
                    precision = "1";
                }
                if ((scale == null) || (scale.length() == 0))
                {
                    scale = "0";
                }
                constraint = precision + "," + scale;
            }
        }
        return constraint;
    }
587144
public final Set<ConstraintViolation<Object>> getConstraintViolations() {
        if (constraintViolations == null) {
            return null;
        }
        return Collections.unmodifiableSet(constraintViolations);
    }
661517
public List<ActionConstraint> getActionConstraints(final WButton button) {
		List<ActionConstraint> constraints = getComponentModel().actionConstraints.get(button);
		return constraints == null ? null : Collections.unmodifiableList(constraints);
	}
67049
public RowView getRowView(View child) {
        ViewParent parent = child.getParent();
        if (parent instanceof RowView) {
            return (RowView) parent;
        }
        return null;
    }
199998
@Override
  public <T extends ConstraintValidator<?, ?>> T getInstance(final Class<T> key) {
    throw new UnsupportedOperationException("GWT does not support "
        + ConstraintValidatorFactory.class.getName() + " use GWT.create instead");
  }
1195425
public final ChildSelector<T> child(ElementConstraint...constraints) {
        return new ChildSelector<T>(getContext(), getCurrentSelector(),
                Arrays.asList(constraints));
    }
303735
public Mapper<K, V> constraint(Restraint<K, V> constraint) {
		return addConstraint(constraint);
	}
1022466
protected static SpringLayout.Constraints getConstraintsForCell (
        int row, int col, Container parent, int cols)
    {
        SpringLayout layout = (SpringLayout)parent.getLayout();
        Component c = parent.getComponent(row * cols + col);
        return layout.getConstraints(c);
    }
61466
Constraint getUniqueConstraintForColumns(int[] cols) {

        for (int i = 0, size = constraintList.length; i < size; i++) {
            Constraint c = constraintList[i];

            if (c.isUniqueWithColumns(cols)) {
                return c;
            }
        }

        return null;
    }