private void assertValues() { if (!valuesToInsert.isEmpty()) { if (columns.isEmpty()) { throw new IllegalStateException("No columns were specified to insert into."); } assertValueSetSizes(columns.size()); } else if (query != null) { if (columns.size() != query.getFields().size()) { throw new IllegalStateException("Number of properties being selected must match the number of columns " + "specified."); } } else if (!defaultValues) { throw new IllegalStateException("No values to insert were specified."); } }
private void assertValues() { if (!valuesToInsert.isEmpty()) { if (columns.isEmpty()) { throw new IllegalStateException("No columns were specified to insert into."); } assertValueSetSizes(columns.size()); } else if (query != null) { if (columns.size() != query.getFields().size()) { throw new IllegalStateException("Number of properties being selected must match the number of columns " + "specified."); } } else if (!defaultValues) { throw new IllegalStateException("No values to insert were specified."); } }