Tabnine Logo
TypeSafeActivator.getColumn
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.hibernate.orm/hibernate-core

private static void applyLength(
    PersistentAttributeMapping property,
    ConstraintDescriptor<?> descriptor,
    PropertyDescriptor propertyDescriptor) {
  if (
      "org.hibernate.validator.constraints.Length".equals(
          descriptor.getAnnotation().annotationType().getName()
      ) && String.class.equals( propertyDescriptor.getElementClass() ) ) {
    @SuppressWarnings("unchecked")
    final int max = (Integer) descriptor.getAttributes().get( "max" );
    final Column col = getColumn( property );
    if ( max < Integer.MAX_VALUE ) {
      col.setLength( (long) max );
    }
  }
}
origin: org.hibernate.orm/hibernate-core

private static void applySize(PersistentAttributeMapping property, ConstraintDescriptor<?> descriptor, PropertyDescriptor propertyDescriptor) {
  if ( Size.class.equals( descriptor.getAnnotation().annotationType() )
      && String.class.equals( propertyDescriptor.getElementClass() ) ) {
    @SuppressWarnings("unchecked")
    final ConstraintDescriptor<Size> sizeConstraint = (ConstraintDescriptor<Size>) descriptor;
    final int max = sizeConstraint.getAnnotation().max();
    final Column col = getColumn( property );
    if ( max < Integer.MAX_VALUE ) {
      col.setLength( (long) max );
    }
  }
}
origin: org.hibernate.orm/hibernate-core

private static void applyMin(PersistentAttributeMapping property, ConstraintDescriptor<?> descriptor, Dialect dialect) {
  if ( Min.class.equals( descriptor.getAnnotation().annotationType() ) ) {
    @SuppressWarnings("unchecked")
    final ConstraintDescriptor<Min> minConstraint = (ConstraintDescriptor<Min>) descriptor;
    final long min = minConstraint.getAnnotation().value();
    final Column col = getColumn( property );
    final String checkConstraint = col.getQuotedName(dialect) + ">=" + min;
    applySQLCheck( col, checkConstraint );
  }
}
origin: org.hibernate.orm/hibernate-core

private static void applyMax(PersistentAttributeMapping property, ConstraintDescriptor<?> descriptor, Dialect dialect) {
  if ( Max.class.equals( descriptor.getAnnotation().annotationType() ) ) {
    @SuppressWarnings("unchecked")
    final ConstraintDescriptor<Max> maxConstraint = (ConstraintDescriptor<Max>) descriptor;
    final long max = maxConstraint.getAnnotation().value();
    final Column col = getColumn( property );
    final String checkConstraint = col.getQuotedName(dialect) + "<=" + max;
    applySQLCheck( col, checkConstraint );
  }
}
origin: org.hibernate.orm/hibernate-core

private static void applyDigits(PersistentAttributeMapping property, ConstraintDescriptor<?> descriptor) {
  if ( Digits.class.equals( descriptor.getAnnotation().annotationType() ) ) {
    @SuppressWarnings("unchecked")
    final ConstraintDescriptor<Digits> digitsConstraint = (ConstraintDescriptor<Digits>) descriptor;
    final int integerDigits = digitsConstraint.getAnnotation().integer();
    final int fractionalDigits = digitsConstraint.getAnnotation().fraction();
    final Column col = getColumn( property );
    col.setPrecision( integerDigits + fractionalDigits );
    col.setScale( fractionalDigits );
  }
}
org.hibernate.cfg.beanvalidationTypeSafeActivatorgetColumn

Popular methods of TypeSafeActivator

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

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now