Codota Logo
MetaBean.getProperty
Code IndexAdd Codota to your IDE (free)

How to use
getProperty
method
in
org.apache.bval.model.MetaBean

Best Java code snippets using org.apache.bval.model.MetaBean.getProperty (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.apache.bval/bval-jsr303

/**
 * Return the property level constraints for a given propertyName or {@code null} if
 * either the property does not exist or has no constraint. The returned
 * object (and associated objects including ConstraintDescriptors) are
 * immutable.
 * 
 * @param propertyName
 *            property evaluated
 */
public PropertyDescriptor getConstraintsForProperty(String propertyName) {
  if (propertyName == null || propertyName.trim().length() == 0) {
    throw new IllegalArgumentException("propertyName cannot be null or empty");
  }
  MetaProperty prop = metaBean.getProperty(propertyName);
  if (prop == null)
    return null;
  // If no constraints and not cascaded, return null
  if (prop.getValidations().length == 0 && prop.getFeature(Features.Property.REF_CASCADE) == null) {
    return null;
  }
  return getPropertyDescriptor(prop);
}
origin: org.apache.bval/bval-core

/**
 * {@inheritDoc}
 */
@Override
public void buildMetaBean(MetaBean meta) throws Exception {
  if (meta.getBeanClass() == null) {
    return; // handle only, when local class exists
  }
  BeanInfo info = Introspector.getBeanInfo(meta.getBeanClass());
  if (meta.getName() == null && info.getBeanDescriptor() != null) {
    meta.setName(info.getBeanDescriptor().getName()); // (display?)name = simple class name!
  }
  for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
    if (!(pd instanceof IndexedPropertyDescriptor || pd.getName().equals("class"))) {
      MetaProperty metaProp = buildMetaProperty(pd, meta.getProperty(pd.getName()));
      meta.putProperty(pd.getName(), metaProp);
    }
  }
}
origin: org.apache.bval/bval-xstream

protected MetaProperty enrichElement(MetaBean meta, XMLMetaElement xmlProp, XMLResult result) throws Exception {
  MetaProperty prop = meta.getProperty(xmlProp.getName());
  if (prop == null) {
    prop = new MetaProperty();
    prop.setName(xmlProp.getName());
    meta.putProperty(xmlProp.getName(), prop);
  }
  xmlProp.mergeInto(prop);
  enrichValidations(prop, xmlProp, result, true);
  return prop;
}
origin: org.apache.bval/bval-jsr303

  metaProperty = null;
} else { // property level
  metaProperty = metabean.getProperty(access.getPropertyName());
  create = metaProperty == null;
  if (create) {
MetaProperty metaProperty = metabean.getProperty(access.getPropertyName());
boolean create = metaProperty == null;
if (create) {
origin: org.apache.bval/bval-jsr303

MetaProperty metaProperty = metabean.getProperty(field.getName());
  if (!factoryContext.getFactory().getAnnotationIgnores().isIgnoreAnnotations(method)) {
    AccessStrategy access = new MethodAccess(propName, method);
    MetaProperty metaProperty = metabean.getProperty(propName);
    boolean create = metaProperty == null;
origin: org.apache.bval/bval-jsr303

/**
 * {@inheritDoc}
 */
public void handleProperty(String token) {
  moveDownIfNecessary();
  MetaBean metaBean = validationContext.getMetaBean();
  if (metaBean instanceof DynamicMetaBean) {
    metaBean = metaBean.resolveMetaBean(ObjectUtils.defaultIfNull(validationContext.getBean(), rawType));
    validationContext.setMetaBean(metaBean);
  }
  MetaProperty mp = metaBean.getProperty(token);
  if (mp == null) {
    // TODO this could indicate a property hosted on a superclass; should we shunt the context traversal down a path based on that type?
    PropertyAccess access = new PropertyAccess(rawType, token);
    if (access.isKnown()) {
      // add heretofore unknown, but valid, property on the fly:
      mp = Jsr303MetaBeanFactory.addMetaProperty(metaBean, access);
    } else {
      throw new UnknownPropertyException("unknown property '" + token + "' in " + metaBean.getId());
    }
  }
  validationContext.setMetaProperty(mp);
  setType(mp.getType());
}
org.apache.bval.modelMetaBeangetProperty

Javadoc

Get the specified MetaProperty.

Popular methods of MetaBean

  • getId
    Get the id.
  • getProperties
    Get the properties.
  • putProperty
    bidirectional - set the relationship between a MetaProperty and its parentMetaBean
  • getBeanClass
    Get the beanClass.
  • getValidations
  • setBeanClass
    Set the beanClass.
  • setId
    Set the id.
  • setName
    Set the name.
  • <init>
  • copy
  • getFeature
  • getName
    Get the name.
  • getFeature,
  • getName,
  • hasRelationships,
  • putFeature,
  • resolveMetaBean

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JButton (javax.swing)
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