public List<Variable> getVariables(AnnotationProvider annotationProvider) {
List<Variable> variables = new ArrayList<Variable>();
Boolean nullable = (Boolean) annotationProvider.getValue("nullable");
if (nullable == null || nullable == false) {
// set only if true, false is default
variables.add(new Variable("notNull", "true", false));
variables.add(new Variable("required", true));
}
variables.add(new Variable("maxLength", annotationProvider.getValue("length")));
variables.add(new Variable("unique", annotationProvider.getValue("unique")));
variables.add(new Variable("precision", annotationProvider.getValue("precision")));
variables.add(new Variable("scale", annotationProvider.getValue("scale")));
return variables;
}