Codota Logo
TypeSafeActivator.resolveProvidedFactory
Code IndexAdd Codota to your IDE (free)

How to use
resolveProvidedFactory
method
in
org.hibernate.cfg.beanvalidation.TypeSafeActivator

Best Java code snippets using org.hibernate.cfg.beanvalidation.TypeSafeActivator.resolveProvidedFactory (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: hibernate/hibernate-orm

private static ValidatorFactory getValidatorFactory(ActivationContext activationContext) {
  // IMPL NOTE : We can either be provided a ValidatorFactory or make one.  We can be provided
  // a ValidatorFactory in 2 different ways.  So here we "get" a ValidatorFactory in the following order:
  //		1) Look into SessionFactoryOptions.getValidatorFactoryReference()
  //		2) Look into ConfigurationService
  //		3) build a new ValidatorFactory
  // 1 - look in SessionFactoryOptions.getValidatorFactoryReference()
  ValidatorFactory factory = resolveProvidedFactory( activationContext.getSessionFactory().getSessionFactoryOptions() );
  if ( factory != null ) {
    return factory;
  }
  // 2 - look in ConfigurationService
  factory = resolveProvidedFactory( activationContext.getServiceRegistry().getService( ConfigurationService.class ) );
  if ( factory != null ) {
    return factory;
  }
  // 3 - build our own
  try {
    return Validation.buildDefaultValidatorFactory();
  }
  catch ( Exception e ) {
    throw new IntegrationException( "Unable to build the default ValidatorFactory", e );
  }
}
origin: org.hibernate.orm/hibernate-core

private static ValidatorFactory getValidatorFactory(ActivationContext activationContext) {
  // IMPL NOTE : We can either be provided a ValidatorFactory or make one.  We can be provided
  // a ValidatorFactory in 2 different ways.  So here we "get" a ValidatorFactory in the following order:
  //		1) Look into SessionFactoryOptions.getValidatorFactoryReference()
  //		2) Look into ConfigurationService
  //		3) build a new ValidatorFactory
  // 1 - look in SessionFactoryOptions.getValidatorFactoryReference()
  ValidatorFactory factory = resolveProvidedFactory( activationContext.getSessionFactory().getSessionFactoryOptions() );
  if ( factory != null ) {
    return factory;
  }
  // 2 - look in ConfigurationService
  factory = resolveProvidedFactory( activationContext.getServiceRegistry().getService( ConfigurationService.class ) );
  if ( factory != null ) {
    return factory;
  }
  // 3 - build our own
  try {
    return Validation.buildDefaultValidatorFactory();
  }
  catch ( Exception e ) {
    throw new IntegrationException( "Unable to build the default ValidatorFactory", e );
  }
}
org.hibernate.cfg.beanvalidationTypeSafeActivatorresolveProvidedFactory

Popular methods of TypeSafeActivator

  • applyConstraints
  • applyDDL
  • applyDigits
  • applyLength
  • applyMax
  • applyMin
  • applyNotNull
  • applySize
  • findPropertyByName
  • getValidatorFactory
  • applySQLCheck
  • applyCallbackListeners
  • applySQLCheck,
  • applyCallbackListeners,
  • applyRelationalConstraints,
  • getColumn,
  • isComposite

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • setContentView (Activity)
  • orElseThrow (Optional)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
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