Search in sources :

Example 1 with EnumType

use of org.jooq.util.jaxb.EnumType in project jOOQ by jOOQ.

the class AbstractDatabase method getConfiguredEnums.

private final List<EnumDefinition> getConfiguredEnums() {
    List<EnumDefinition> result = new ArrayList<EnumDefinition>();
    for (EnumType enumType : configuredEnumTypes) {
        String name = enumType.getName();
        DefaultEnumDefinition e = new DefaultEnumDefinition(getSchemata().get(0), name, null, true);
        String literals = enumType.getLiterals();
        try {
            @SuppressWarnings("resource") CSVReader reader = new CSVReader(new StringReader(literals));
            e.addLiterals(reader.readNext());
        } catch (IOException ignore) {
        }
        result.add(e);
    }
    return result;
}
Also used : CSVReader(org.jooq.tools.csv.CSVReader) EnumType(org.jooq.util.jaxb.EnumType) ArrayList(java.util.ArrayList) StringReader(java.io.StringReader) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 StringReader (java.io.StringReader)1 ArrayList (java.util.ArrayList)1 CSVReader (org.jooq.tools.csv.CSVReader)1 EnumType (org.jooq.util.jaxb.EnumType)1