Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch(property.getType()) {
- case INTEGER:
- type = "INTEGER"; break;
- case REAL:
- type = "REAL"; break;
- default:
- type = "VARCHAR";
- if(property.hasConstraint(Length.class)==true)
- out.printf("(%s)", property.getConstraint(Length.class).getMaxLength());
- else
- out.printf("(50)");
- }
- if(property.hasConstraint(Required.class)==true) {
- String a = "NOT NULL";
- out.printf(",%s %s %s\n", property.getName(), type, a);
- }
- else
- out.printf(",%s %s\n", property.getName(), type);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement