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

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

Best Java code snippets using org.apache.bval.model.MetaBean.getFeature (Showing top 5 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

private void processGroupSequence(Class<?> beanClass, MetaBean metabean, String key) {
  GroupSequence annotation = beanClass.getAnnotation(GroupSequence.class);
  List<Group> groupSeq = metabean.getFeature(key);
  if (groupSeq == null) {
    groupSeq = new ArrayList<Group>(annotation == null ? 1 : annotation.value().length);
origin: org.apache.bval/bval-jsr303

/**
 * {@inheritDoc} Return the descriptor object describing bean constraints. The returned object (and associated
 * objects including <code>ConstraintDescriptor<code>s) are immutable.
 *
 * @param clazz class or interface type evaluated
 * @return the bean descriptor for the specified class.
 * @throws IllegalArgumentException if clazz is null
 * @throws ValidationException      if a non recoverable error happens during the metadata
 *                                  discovery or if some constraints are invalid.
 */
// @Override - not allowed in 1.5 for Interface methods
public BeanDescriptor getConstraintsForClass(Class<?> clazz) {
  if (clazz == null) {
    throw new IllegalArgumentException("Class cannot be null");
  }
  try {
    MetaBean metaBean = getMetaBeanFinder().findForClass(clazz);
    BeanDescriptorImpl edesc = metaBean.getFeature(Jsr303Features.Bean.BEAN_DESCRIPTOR);
    if (edesc == null) {
      edesc = createBeanDescriptor(metaBean);
      metaBean.putFeature(Jsr303Features.Bean.BEAN_DESCRIPTOR, edesc);
    }
    return edesc;
  } catch (RuntimeException ex) {
    throw new ValidationException("error retrieving constraints for " + clazz, ex);
  }
}
origin: org.apache.bval/bval-jsr303

/**
 * {@inheritDoc}
 */
public ElementDescriptor.ConstraintFinder unorderedAndMatchingGroups(Class<?>... groups) {
  Set<ConstraintValidation<?>> matchingDescriptors =
    new HashSet<ConstraintValidation<?>>(constraintDescriptors.size());
  Groups groupChain = new GroupsComputer().computeGroups(groups);
  for (Group group : groupChain.getGroups()) {
    if (group.isDefault()) {
      // If group is default, check if it gets redefined
      List<Group> expandedDefaultGroup = metaBean.getFeature(Jsr303Features.Bean.GROUP_SEQUENCE);
      for (Group defaultGroupMember : expandedDefaultGroup) {
        for (ConstraintValidation<?> descriptor : constraintDescriptors) {
          if (isInScope(descriptor) && isInGroup(descriptor, defaultGroupMember)) {
            matchingDescriptors.add(descriptor);
          }
        }
      }
    } else {
      for (ConstraintValidation<?> descriptor : constraintDescriptors) {
        if (isInScope(descriptor) && isInGroup(descriptor, group)) {
          matchingDescriptors.add(descriptor);
        }
      }
    }
  }
  return thisWith(matchingDescriptors);
}
origin: org.apache.bval/bval-jsr303

/**
 * in case of a default group return the list of groups for a redefined default GroupSequence
 *
 * @return null when no in default group or default group sequence not redefined
 */
private List<Group> expandDefaultGroup(GroupValidationContext<?> context) {
  if (context.getCurrentGroup().isDefault()) {
    // mention if metaBean redefines the default group
    List<Group> groupSeq = context.getMetaBean().getFeature(Jsr303Features.Bean.GROUP_SEQUENCE);
    if (groupSeq != null) {
      context.getGroups().assertDefaultGroupSequenceIsExpandable(groupSeq);
    }
    return groupSeq;
  } else {
    return null;
  }
}
origin: org.apache.bval/bval-jsr303

  context.getMetaBean().getFeature("{GroupSequence:" + owner.getCanonicalName() + "}");
for (Group each : ownerDefaultGroups) {
  context.setCurrentGroup(each);
org.apache.bval.modelMetaBeangetFeature

Popular methods of MetaBean

  • getId
    Get the id.
  • getProperties
    Get the properties.
  • getProperty
    Get the specified MetaProperty.
  • 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
  • getName
    Get the name.
  • copy,
  • 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