Package javax.persistence

Examples of javax.persistence.Basic.optional()


          //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


      config.setWidth(columnAnnotation.length());
      config.setCanBeNull(columnAnnotation.nullable());
      config.setUnique(columnAnnotation.unique());
    }
    if (basicAnnotation != null) {
      config.setCanBeNull(basicAnnotation.optional());
    }
    if (idAnnotation != null) {
      if (generatedValueAnnotation == null) {
        config.setId(true);
      } else {
View Full Code Here

    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

          //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.