public String getSchema() { StringBuilder builder = new StringBuilder(); builder.append(getColumnName()); builder.append(" "); builder.append(sqlType); if (annotations.containsKey(PrimaryKey.class)) { builder.append(" PRIMARY KEY"); } if (annotations.containsKey(AutoIncrement.class)) { builder.append(" AUTOINCREMENT"); } if (annotations.containsKey(NotNull.class)) { builder.append(" NOT NULL"); appendConflictClause(builder, ((NotNull) annotations.get(NotNull.class)).value()); } if (annotations.containsKey(Unique.class)) { builder.append(" UNIQUE"); appendConflictClause(builder, ((Unique) annotations.get(Unique.class)).value()); } if (annotations.containsKey(Check.class)) { builder.append(" CHECK (").append(((Check) annotations.get(Check.class)).value()).append(")"); } if (annotations.containsKey(Default.class)) { builder.append(" DEFAULT ").append(((Default) annotations.get(Default.class)).value()); } if (annotations.containsKey(Collate.class)) { builder.append(" COLLATE ").append(((Collate) annotations.get(Collate.class)).value().keyword()); } return builder.toString(); }