Package javax.persistence

Examples of javax.persistence.Basic.optional()


    Basic basicAnn = _field.getAnnotation(Basic.class);
    if (basicAnn != null) {
      _fetch = basicAnn.fetch();
      _isOptional = basicAnn.optional();
    }
  
    Column columnAnn = _field.getAnnotation(Column.class);
   
    if (columnAnn != null)
View Full Code Here


        Set<Annotation> annotations = getAllPropertyAnnotations(clazz, descriptor);

        // handling nullability only if more explicit validation annotations do not exit.
        if (!contains(annotations, NotNull.class) &&
            (!LibraryUtils.HIBERNATE_VALIDATOR_IN_CLASSPATH || !contains(annotations, org.hibernate.validator.NotNull.class))) {
            if (!basic.optional()) {
                PropertyValidationRule propertyRule = new PropertyValidationRule(descriptor.getName(), new NotNullValidationRule());
                configuration.addPropertyRule(descriptor.getName(), propertyRule);
            }
        }
View Full Code Here

          //provide the basic property mapping
          boolean optional = true;
          boolean lazy = false;
          if ( property.isAnnotationPresent( Basic.class ) ) {
            Basic ann = property.getAnnotation( Basic.class );
            optional = ann.optional();
            lazy = ann.fetch() == FetchType.LAZY;
          }
          //implicit type will check basic types and Serializable classes
          if ( isId || ( !optional && nullability != Nullability.FORCED_NULL ) ) {
            //force columns to not null
View Full Code Here

        //provide the basic property mapping
        boolean optional = true;
        boolean lazy = false;
        if ( property.isAnnotationPresent( Basic.class ) ) {
          Basic ann = property.getAnnotation( Basic.class );
          optional = ann.optional();
          lazy = ann.fetch() == FetchType.LAZY;
        }
        //implicit type will check basic types and Serializable classes
        if ( !optional && nullability != Nullability.FORCED_NULL ) {
          //force columns to not null
View Full Code Here

          //provide the basic property mapping
          boolean optional = true;
          boolean lazy = false;
          if ( property.isAnnotationPresent( Basic.class ) ) {
            Basic ann = property.getAnnotation( Basic.class );
            optional = ann.optional();
            lazy = ann.fetch() == FetchType.LAZY;
          }
          //implicit type will check basic types and Serializable classes
          if ( isId || ( !optional && nullability != Nullability.FORCED_NULL ) ) {
            //force columns to not null
View Full Code Here

          //provide the basic property mapping
          boolean optional = true;
          boolean lazy = false;
          if ( property.isAnnotationPresent( Basic.class ) ) {
            Basic ann = property.getAnnotation( Basic.class );
            optional = ann.optional();
            lazy = ann.fetch() == FetchType.LAZY;
          }
          //implicit type will check basic types and Serializable classes
          if ( isId || ( !optional && nullability != Nullability.FORCED_NULL ) ) {
            //force columns to not null
View Full Code Here

          //provide the basic property mapping
          boolean optional = true;
          boolean lazy = false;
          if ( property.isAnnotationPresent( Basic.class ) ) {
            Basic ann = property.getAnnotation( Basic.class );
            optional = ann.optional();
            lazy = ann.fetch() == FetchType.LAZY;
          }
          //implicit type will check basic types and Serializable classes
          if ( isId || ( !optional && nullability != Nullability.FORCED_NULL ) ) {
            //force columns to not null
View Full Code Here

        //provide the basic property mapping
        boolean optional = true;
        boolean lazy = false;
        if ( property.isAnnotationPresent( Basic.class ) ) {
          Basic ann = property.getAnnotation( Basic.class );
          optional = ann.optional();
          lazy = ann.fetch() == FetchType.LAZY;
        }
        //implicit type will check basic types and Serializable classes
        if ( !optional && nullability != Nullability.FORCED_NULL ) {
          //force columns to not null
View Full Code Here

          //provide the basic property mapping
          boolean optional = true;
          boolean lazy = false;
          if ( property.isAnnotationPresent( Basic.class ) ) {
            Basic ann = property.getAnnotation( Basic.class );
            optional = ann.optional();
            lazy = ann.fetch() == FetchType.LAZY;
          }
          //implicit type will check basic types and Serializable classes
          if ( isId || ( !optional && nullability != Nullability.FORCED_NULL ) ) {
            //force columns to not null
View Full Code Here

          //provide the basic property mapping
          boolean optional = true;
          boolean lazy = false;
          if ( property.isAnnotationPresent( Basic.class ) ) {
            Basic ann = property.getAnnotation( Basic.class );
            optional = ann.optional();
            lazy = ann.fetch() == FetchType.LAZY;
          }
          //implicit type will check basic types and Serializable classes
          if ( isId || ( !optional && nullability != Nullability.FORCED_NULL ) ) {
            //force columns to not null
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.