public boolean isNullable() { return isFormula() ? true : mappingColumn.isNullable(); }
public static void checkPropertyConsistency(Ejb3Column[] columns, String propertyName) { int nbrOfColumns = columns.length; if ( nbrOfColumns > 1 ) { for (int currentIndex = 1; currentIndex < nbrOfColumns; currentIndex++) { if (columns[currentIndex].isFormula() || columns[currentIndex - 1].isFormula()) { continue; } if ( columns[currentIndex].isInsertable() != columns[currentIndex - 1].isInsertable() ) { throw new AnnotationException( "Mixing insertable and non insertable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isNullable() != columns[currentIndex - 1].isNullable() ) { throw new AnnotationException( "Mixing nullable and non nullable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isUpdatable() != columns[currentIndex - 1].isUpdatable() ) { throw new AnnotationException( "Mixing updatable and non updatable columns in a property is not allowed: " + propertyName ); } if ( !columns[currentIndex].getTable().equals( columns[currentIndex - 1].getTable() ) ) { throw new AnnotationException( "Mixing different tables in a property is not allowed: " + propertyName ); } } } }
if ( isId && col.isFormula() ) { throw new CannotForceNonNullableException( String.format(
public boolean isNullable() { return isFormula() ? true : mappingColumn.isNullable(); }
public static void checkPropertyConsistency(Ejb3Column[] columns, String propertyName) { int nbrOfColumns = columns.length; if ( nbrOfColumns > 1 ) { for (int currentIndex = 1; currentIndex < nbrOfColumns; currentIndex++) { if (columns[currentIndex].isFormula() || columns[currentIndex - 1].isFormula()) { continue; } if ( columns[currentIndex].isInsertable() != columns[currentIndex - 1].isInsertable() ) { throw new AnnotationException( "Mixing insertable and non insertable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isNullable() != columns[currentIndex - 1].isNullable() ) { throw new AnnotationException( "Mixing nullable and non nullable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isUpdatable() != columns[currentIndex - 1].isUpdatable() ) { throw new AnnotationException( "Mixing updatable and non updatable columns in a property is not allowed: " + propertyName ); } if ( !columns[currentIndex].getMappedTable().equals( columns[currentIndex - 1].getMappedTable() ) ) { throw new AnnotationException( "Mixing different tables in a property is not allowed: " + propertyName ); } } } }
public static void checkPropertyConsistency(Ejb3Column[] columns, String propertyName) { int nbrOfColumns = columns.length; if ( nbrOfColumns > 1 ) { for (int currentIndex = 1; currentIndex < nbrOfColumns; currentIndex++) { if (columns[currentIndex].isFormula() || columns[currentIndex - 1].isFormula()) { continue; } if ( columns[currentIndex].isInsertable() != columns[currentIndex - 1].isInsertable() ) { throw new AnnotationException( "Mixing insertable and non insertable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isNullable() != columns[currentIndex - 1].isNullable() ) { throw new AnnotationException( "Mixing nullable and non nullable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isUpdatable() != columns[currentIndex - 1].isUpdatable() ) { throw new AnnotationException( "Mixing updatable and non updatable columns in a property is not allowed: " + propertyName ); } if ( !columns[currentIndex].getTable().equals( columns[currentIndex - 1].getTable() ) ) { throw new AnnotationException( "Mixing different tables in a property is not allowed: " + propertyName ); } } } }
public static void checkPropertyConsistency(Ejb3Column[] columns, String propertyName) { int nbrOfColumns = columns.length; if ( nbrOfColumns > 1 ) { for (int currentIndex = 1; currentIndex < nbrOfColumns; currentIndex++) { if (columns[currentIndex].isFormula() || columns[currentIndex - 1].isFormula()) { continue; } if ( columns[currentIndex].isInsertable() != columns[currentIndex - 1].isInsertable() ) { throw new AnnotationException( "Mixing insertable and non insertable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isNullable() != columns[currentIndex - 1].isNullable() ) { throw new AnnotationException( "Mixing nullable and non nullable columns in a property is not allowed: " + propertyName ); } if ( columns[currentIndex].isUpdatable() != columns[currentIndex - 1].isUpdatable() ) { throw new AnnotationException( "Mixing updatable and non updatable columns in a property is not allowed: " + propertyName ); } if ( !columns[currentIndex].getTable().equals( columns[currentIndex - 1].getTable() ) ) { throw new AnnotationException( "Mixing different tables in a property is not allowed: " + propertyName ); } } } }
if ( isId && col.isFormula() ) { throw new CannotForceNonNullableException( String.format(