Examples of nullable()


Examples of javax.persistence.Column.nullable()

        if (!isId())
        {
            Column anno = member.getAnnotation(Column.class);
            if (anno != null)
            {
                isNullable = anno.nullable();
            }
        }
        else
        {
            isNullable = false;
View Full Code Here

Examples of javax.persistence.Column.nullable()

      }
      if (stringNotEmpty(columnAnnotation.columnDefinition())) {
        config.setColumnDefinition(columnAnnotation.columnDefinition());
      }
      config.setWidth(columnAnnotation.length());
      config.setCanBeNull(columnAnnotation.nullable());
      config.setUnique(columnAnnotation.unique());
    }
    if (basicAnnotation != null) {
      config.setCanBeNull(basicAnnotation.optional());
    }
View Full Code Here

Examples of javax.persistence.Column.nullable()

                    throw new RuntimeException("No column annotation on field '"
                            + ident + "' at " + parentClazz.getName());
                } else if(!jColumnAnnot.nullable()) {
                    return false;
                }
            } else if(!columnAnnot.nullable()) {
                return false;
            }
        } catch (NoSuchFieldException ex) {
            if(parentClazz.getSuperclass() != null) {
                return isNullable(parentClazz.getSuperclass(), ident);
View Full Code Here

Examples of javax.persistence.Column.nullable()

        Preconditions.checkArgument(!usedColumnNames.contains(columnMapper.getColumnName().toLowerCase()),
            String.format("duplicate case-insensitive column name: %s", columnMapper.getColumnName()));
        columnList.put(columnMapper.getColumnName(), columnMapper);
        usedColumnNames.add(columnMapper.getColumnName().toLowerCase());
       
              if (!annotation.nullable()) {
                  nonNullableFields.add(columnMapper);
              }
      }
    }
  }
View Full Code Here

Examples of javax.persistence.Column.nullable()

                                    // TODO Make inferrals about jdbctype, length etc if the field is 1 char etc
                                    ColumnMetaData colmd = new ColumnMetaData();
                                    colmd.setName(col.name());
                                    colmd.setLength(col.length());
                                    colmd.setScale(col.scale());
                                    colmd.setAllowsNull(col.nullable());
                                    colmd.setInsertable(col.insertable());
                                    colmd.setUpdateable(col.updatable());
                                    colmd.setUnique(col.unique());
                                    fmd.addColumn(colmd);
                                    overriddenFields.add(fmd);
View Full Code Here

Examples of javax.persistence.Column.nullable()

                            // TODO Make inferrals about jdbctype, length etc if the field is 1 char etc
                            ColumnMetaData colmd = new ColumnMetaData();
                            colmd.setName(col.name());
                            colmd.setLength(col.length());
                            colmd.setScale(col.scale());
                            colmd.setAllowsNull(col.nullable());
                            colmd.setInsertable(col.insertable());
                            colmd.setUpdateable(col.updatable());
                            colmd.setUnique(col.unique());
                            fmd.addColumn(colmd);
                            overriddenFields.add(fmd);
View Full Code Here

Examples of javax.persistence.JoinColumn.nullable()

                                                 keyColumn.getName());

        if (joinAnn != null) {
          columnName = joinAnn.name();

          nullable = joinAnn.nullable();
          unique = joinAnn.unique();
        }
      }

      ForeignColumn foreignColumn;
View Full Code Here

Examples of javax.persistence.JoinColumn.nullable()

        if (joinColumn != null) {
          prop.getTableJoin().addJoinColumn(false, joinColumn, beanTable);
          if (!joinColumn.updatable()) {
            prop.setDbUpdateable(false);
          }
          if (!joinColumn.nullable()) {
            prop.setNullable(false);
          }
        }

        JoinColumns joinColumns = get(prop, JoinColumns.class);
View Full Code Here

Examples of javax.persistence.JoinColumn.nullable()

          if (!propertyDescriptor.isAnnotationPresent(JoinColumn.class)) {
            collection.add("Missing @JoinColumn on " + beanDescriptor.getType().getCanonicalName() + "." + propertyDescriptor.getName());
          } else {
            JoinColumn joinColumn = propertyDescriptor.getAnnotation(JoinColumn.class);
            if (manyToOne.optional() != joinColumn.nullable()) {
              collection.add("Conflict in @ManyToOne(optional) and @JoinColumn(nullable) on " + beanDescriptor.getType().getCanonicalName() + "." + propertyDescriptor.getName());
            }
          }
        }
        if (propertyDescriptor.isAnnotationPresent(OneToMany.class)) {
View Full Code Here

Examples of javax.persistence.JoinColumn.nullable()

          if (ConditionUtils.isEmpty(mappedBy)) {
            if (!propertyDescriptor.isAnnotationPresent(JoinColumn.class)) {
              collection.add("Missing @OneToOne(mappedBy) or @JoinColumn on " + beanDescriptor.getType().getCanonicalName() + "." + propertyDescriptor.getName());
            } else {
              JoinColumn joinColumn = propertyDescriptor.getAnnotation(JoinColumn.class);
              if (oneToOne.optional() != joinColumn.nullable()) {
                collection.add("Conflict in @OneToOne(optional) and @JoinColumn(nullable) on " + beanDescriptor.getType().getCanonicalName() + "." + propertyDescriptor.getName());
              }
            }
          }
        }
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.