Examples of nullable()


Examples of com.antiaction.common.json.annotation.JSON.nullable()

    if ( json != null ) {
      String[] ignores = json.ignore();
      for ( int i=0; i<ignores.length; ++i) {
        json_om.ignore.add( ignores[ i ] );
      }
      String [] nullables = json.nullable();
      for ( int i=0; i<nullables.length; ++i ) {
        json_om.nullableSet.add( nullables[ i ] );
      }
      String[] nullValues = json.nullValues();
      for ( int i=0; i<nullValues.length; ++i ) {
View Full Code Here

Examples of javax.persistence.Column.nullable()

                                    null, "persistent", null, null, null, null, null, null, null, null, null, null, null, null,
                                    null, null, null, null, null, null);
                                Column col = overrides[j].column();
                                // TODO Make inferrals about jdbctype, length etc if the field is 1 char etc
                                fmd.addColumn(new ColumnMetaData(fmd, col.name(), null, null, null, null,
                                    "" + col.length(), "" + col.scale(), "" + col.nullable(), null, null,
                                    "" + col.insertable(), "" + col.updatable(), "" + col.unique()));
                                overriddenFields.add(fmd);
                            }
                        }
                    }
View Full Code Here

Examples of javax.persistence.Column.nullable()

                            null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                            null, null, null, null, null, null);
                        Column col = (Column)annotationValues.get("column");
                        // TODO Make inferrals about jdbctype, length etc if the field is 1 char etc
                        fmd.addColumn(new ColumnMetaData(fmd, col.name(), null, null, null, null,
                            "" + col.length(), "" + col.scale(), "" + col.nullable(), null, null,
                            "" + col.insertable(), "" + col.updatable(), "" + col.unique()));
                        overriddenFields.add(fmd);
                    }
                    else if (annName.equals(JPAAnnotationUtils.ASSOCIATION_OVERRIDES))
                    {
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.Column.nullable()

        }

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

Examples of javax.persistence.Column.nullable()

    assertAnnotationPresent( ElementCollection.class );
    assertAnnotationPresent( Column.class );
    Column column = reader.getAnnotation( Column.class );
    assertEquals( "", column.name() );
    assertFalse( column.unique() );
    assertTrue( column.nullable() );
    assertTrue( column.insertable() );
    assertTrue( column.updatable() );
    assertEquals( "", column.columnDefinition() );
    assertEquals( "", column.table() );
    assertEquals( 255, column.length() );
View Full Code Here

Examples of javax.persistence.Column.nullable()

    assertAnnotationPresent( ElementCollection.class );
    assertAnnotationPresent( Column.class );
    Column column = reader.getAnnotation( Column.class );
    assertEquals( "col1", column.name() );
    assertTrue( column.unique() );
    assertFalse( column.nullable() );
    assertFalse( column.insertable() );
    assertFalse( column.updatable() );
    assertEquals( "int", column.columnDefinition() );
    assertEquals( "table1", column.table() );
    assertEquals( 50, column.length() );
View Full Code Here

Examples of javax.persistence.Column.nullable()

                                                columnDefinition.equals(ColumnDefinitions.TINYINT)) {
                                            definition = (column.length() != 0) ? column.name() + " " + object + "(" +column.length() + ") " : column.name() + " " + object;
                                        }

                                        definition =  column.name() + " " + object;
                                        definition = (!column.nullable()) ? definition + " NOT NULL, " : definition + ",";
                                        if (column.name().equals("ID")) {
                                            definition = column.name() + " INT PRIMARY KEY NOT NULL, ";
                                        }

                                        createTableBuilder.append(definition);
View Full Code Here

Examples of javax.persistence.Column.nullable()

      p.setColumn(column);
      p.setType(f.getType().getName());
      p.setNotNull("true");
      if (colAnn != null) {
        // int size = colAnn.length();
        p.setNotNull(String.valueOf(colAnn.nullable()));
        p.setUnique(String.valueOf(colAnn.unique()));
      }

      if (ClassUtil.isPojo(f.getType())) {
        OneToOne oneAnn = getter.getAnnotation(OneToOne.class);
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.