// if the column annotation is null we don't have to do anything. Everything is already defaulted.
if ( columnAnnotation == null ) {
return;
}
AnnotationValue nameValue = columnAnnotation.value( "name" );
if ( nameValue != null ) {
this.name = nameValue.asString();
}
AnnotationValue uniqueValue = columnAnnotation.value( "unique" );
if ( uniqueValue != null ) {
this.unique = nameValue.asBoolean();
}
AnnotationValue nullableValue = columnAnnotation.value( "nullable" );
if ( nullableValue != null ) {
this.nullable = nullableValue.asBoolean();
}
AnnotationValue insertableValue = columnAnnotation.value( "insertable" );
if ( insertableValue != null ) {
this.insertable = insertableValue.asBoolean();
}
AnnotationValue updatableValue = columnAnnotation.value( "updatable" );
if ( updatableValue != null ) {
this.updatable = updatableValue.asBoolean();
}
AnnotationValue columnDefinition = columnAnnotation.value( "columnDefinition" );
if ( columnDefinition != null ) {
this.columnDefinition = columnDefinition.asString();
}
AnnotationValue tableValue = columnAnnotation.value( "table" );
if ( tableValue != null ) {
this.table = tableValue.asString();
}
AnnotationValue lengthValue = columnAnnotation.value( "length" );
if ( lengthValue != null ) {
this.length = lengthValue.asInt();
}
AnnotationValue precisionValue = columnAnnotation.value( "precision" );
if ( precisionValue != null ) {
this.precision = precisionValue.asInt();
}
AnnotationValue scaleValue = columnAnnotation.value( "scale" );
if ( scaleValue != null ) {
this.scale = scaleValue.asInt();
}
}