Codota Logo
MetaProperty.getMetaBean
Code IndexAdd Codota to your IDE (free)

How to use
getMetaBean
method
in
org.apache.bval.model.MetaProperty

Best Java code snippets using org.apache.bval.model.MetaProperty.getMetaBean (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.apache.bval/bval-core

/**
 * {@inheritDoc}
 */
@Override
public void moveDown(MetaProperty prop, AccessStrategy access) {
  setBean(getPropertyValue(access), prop.getMetaBean());
}
origin: org.apache.bval/bval-jsr303

/**
 * {@inheritDoc}
 * 
 * @return the property descriptors having at least a constraint defined
 */
public Set<PropertyDescriptor> getConstrainedProperties() {
  Set<PropertyDescriptor> validatedProperties = new HashSet<PropertyDescriptor>();
  for (MetaProperty prop : metaBean.getProperties()) {
    if (prop.getValidations().length > 0
      || (prop.getMetaBean() != null || prop.getFeature(Features.Property.REF_CASCADE) != null)) {
      validatedProperties.add(getPropertyDescriptor(prop));
    }
  }
  return Collections.unmodifiableSet(validatedProperties);
}
origin: org.apache.bval/bval-jsr303

/**
 * Returns true if the bean involves validation:
 * <ul>
 * <li>a constraint is hosted on the bean itself</li>
 * <li>a constraint is hosted on one of the bean properties, OR</li>
 * <li>a bean property is marked for cascade (<code>@Valid</code>)</li>
 * </ul>
 * 
 * @return true if the bean involves validation
 */
public boolean isBeanConstrained() {
  if (hasAnyConstraints())
    return true;
  for (MetaProperty mprop : metaBean.getProperties()) {
    if (mprop.getMetaBean() != null || mprop.getFeature(Features.Property.REF_CASCADE) != null)
      return true;
  }
  return false;
}
origin: org.apache.bval/bval-jsr303

/**
 * Create a new PropertyDescriptorImpl instance.
 * 
 * @param property
 */
PropertyDescriptorImpl(MetaProperty property) {
  super(property.getParentMetaBean(), property.getTypeClass(), property.getValidations());
  setCascaded(property.getMetaBean() != null || property.getFeature(Features.Property.REF_CASCADE) != null);
  setPropertyPath(property.getName());
}
origin: org.apache.bval/bval-jsr303

/**
 * If we currently have a property, navigate the context such that the property becomes the bean, in preparation for
 * another property.
 * 
 * @param validationContext
 */
public void moveDownIfNecessary() {
  MetaProperty mp = validationContext.getMetaProperty();
  if (mp != null) {
    if (mp.getMetaBean() == null) {
      throw new UnknownPropertyException(String.format("Property %s.%s is not cascaded", mp
        .getParentMetaBean().getId(), mp.getName()));
    }
    validationContext.moveDown(mp, new NullSafePropertyAccess(validationContext.getMetaBean().getBeanClass(),
      mp.getName()));
  }
}
origin: org.apache.bval/bval-core

MetaProperty prop) {
AccessStrategy[] access = prop.getFeature(Features.Property.REF_CASCADE);
if (access == null && prop.getMetaBean() != null) { // single property access strategy
origin: org.apache.bval/bval-jsr303

boolean doCascade = cascade && (prop == null || prop.getMetaBean() != null);
org.apache.bval.modelMetaPropertygetMetaBean

Javadoc

Get the metabean of the target bean (mainly for relationships).

Popular methods of MetaProperty

  • <init>
    Create a new MetaProperty instance.
  • getFeature
  • putFeature
  • setName
    Set the name of this property.
  • setType
    Set the type of this property.
  • getName
    Get the name of this property.
  • getParentMetaBean
  • getValidations
  • setMetaBean
    Set the MetaBean of this MetaProperty.
  • copy
  • getType
    Get the type of this property.
  • getTypeClass
    Resolve the type of this property to a class.
  • getType,
  • getTypeClass,
  • isMandatory,
  • isRelationship,
  • setParentMetaBean

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now