Remove trailing whitespace in querydsl-jpa-codegen

This commit is contained in:
John Tims 2015-05-09 00:56:32 -04:00
parent 97cb156134
commit 2011ac4b23
31 changed files with 63 additions and 63 deletions

View File

@ -1,6 +1,6 @@
/*
* Copyright 2015, The Querydsl Team (http://www.querydsl.com/team)
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -19,12 +19,12 @@ import com.google.common.collect.ImmutableList;
/**
* Constants defines keywords used in Hibernate
*
*
* @author tiwe
*
*/
final class Constants {
public static final List<String> keywords = ImmutableList.of(
"ABS","ALL","AND","ANY","AS","ASC","AVG","BETWEEN",
"BIT_LENGTH[51]","BOTH","BY","CASE","CHAR_LENGTH",

View File

@ -14,5 +14,5 @@ public class GenericExporterTest {
exporter.setTargetFolder(new File("target/" + GenericExporterTest.class.getSimpleName()));
exporter.export(getClass().getPackage());
}
}

View File

@ -1,6 +1,6 @@
/*
* Copyright 2015, The Querydsl Team (http://www.querydsl.com/team)
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -4,5 +4,5 @@ package com.querydsl.jpa.domain10;
public class CustomType {
String property;
}

View File

@ -1,9 +1,9 @@
package com.querydsl.jpa.domain10;
public class Entity {
String id;
CustomType custom;
}

View File

@ -24,17 +24,17 @@ public class DomainExporter11Test {
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain11/domain.hbm.xml"));
HibernateDomainExporter exporter = new HibernateDomainExporter("Q", gen, config);
exporter.execute();
assertTrue(new File(gen, "com/querydsl/jpa/domain11/QOtherthing.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain11/QSomething.java").exists());
String str = Files.toString(new File(gen, "com/querydsl/jpa/domain11/QOtherthing.java"), Charsets.UTF_8);
assertTrue(str.contains("QSomething"));
str = Files.toString(new File(gen, "com/querydsl/jpa/domain11/QSomething.java"), Charsets.UTF_8);
assertTrue(str.contains("id"));
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -1,5 +1,5 @@
package com.querydsl.jpa.domain11;
public interface ISomething {
}

View File

@ -3,7 +3,7 @@ package com.querydsl.jpa.domain11;
public class Otherthing {
String id;
ISomething property;
}

View File

@ -1,6 +1,6 @@
package com.querydsl.jpa.domain11;
public class Something implements ISomething {
String id;
}

View File

@ -22,11 +22,11 @@ public class DomainExporter12Test {
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain12/domain.hbm.xml"));
HibernateDomainExporter exporter = new HibernateDomainExporter("Q", gen, config);
exporter.execute();
assertTrue(new File(gen, "com/querydsl/jpa/domain12/QEntity.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain12/QSupertype.java").exists());
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -1,9 +1,9 @@
package com.querydsl.jpa.domain12;
public class Entity extends Supertype {
String id;
Entity entity;
}

View File

@ -21,11 +21,11 @@ public class DomainExporter13Test {
Configuration config = new Configuration();
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain13/domain.hbm.xml"));
HibernateDomainExporter exporter = new HibernateDomainExporter("Q", gen, config);
exporter.execute();
exporter.execute();
assertTrue(new File(gen, "com/querydsl/jpa/domain13/QEntity.java").exists());
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -2,6 +2,6 @@ package com.querydsl.jpa.domain13;
class Entity {
String id;
Status status;
}

View File

@ -21,12 +21,12 @@ public class DomainExporter14Test {
Configuration config = new Configuration();
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain14/domain.hbm.xml"));
HibernateDomainExporter exporter = new HibernateDomainExporter("Q", gen, config);
exporter.execute();
exporter.execute();
assertTrue(new File(gen, "com/querydsl/jpa/domain14/QSiCZuCapiRechtMapping.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain14/QMappingID.java").exists());
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -21,13 +21,13 @@ public class DomainExporter15Test {
Configuration config = new Configuration();
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain15/domain.hbm.xml"));
HibernateDomainExporter exporter = new HibernateDomainExporter("Q", gen, config);
exporter.execute();
exporter.execute();
assertTrue(new File(gen, "com/querydsl/jpa/domain15/QEntity.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain15/QEntity2.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain15/QSuperclass.java").exists());
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -8,9 +8,9 @@ import com.querydsl.core.annotations.QuerySupertype;
public class Superclass<T> {
Long id;
List<T> values;
List<? extends T> values2;
}

View File

@ -1,11 +1,11 @@
package com.querydsl.jpa.domain5;
public abstract class Contact {
private Long id;
private String value;
public Long getId() {
return id;
}

View File

@ -16,14 +16,14 @@ import com.querydsl.jpa.codegen.CompileUtils;
import com.querydsl.jpa.codegen.HibernateDomainExporter;
public class DomainExporter5Test {
@Test
public void Execute() throws IOException {
File gen = new File("target/" + getClass().getSimpleName());
FileUtils.delete(gen);
Configuration config = new Configuration();
for (String res : Arrays.asList("Customer.hbm.xml",
"CustomerContact.hbm.xml",
for (String res : Arrays.asList("Customer.hbm.xml",
"CustomerContact.hbm.xml",
"CustomerHistory.hbm.xml")) {
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain5/" + res));
}
@ -45,5 +45,5 @@ public class DomainExporter5Test {
assertTrue(str + " was not contained", result.contains(str));
}
}
}

View File

@ -3,7 +3,7 @@ package com.querydsl.jpa.domain5;
public class HistoryEntity {
private Long id;
private String description;
public String getDescription() {
@ -21,7 +21,7 @@ public class HistoryEntity {
public void setId(Long id) {
this.id = id;
}
}

View File

@ -7,11 +7,11 @@ import java.util.Set;
public class Person<T extends Contact, H extends HistoryEntity> {
private Long id;
private Set<T> contacts = new HashSet<T>();
private Set<H> history = new HashSet<H>();
public Long getId() {
return id;
}
@ -36,5 +36,5 @@ public class Person<T extends Contact, H extends HistoryEntity> {
this.history = history;
}
}

View File

@ -15,7 +15,7 @@ import com.querydsl.jpa.codegen.CompileUtils;
import com.querydsl.jpa.codegen.HibernateDomainExporter;
public class DomainExporter6Test {
@Test
public void Execute() throws IOException {
File gen = new File("target/" + getClass().getSimpleName());
@ -27,9 +27,9 @@ public class DomainExporter6Test {
File targetFile = new File(gen, "com/querydsl/jpa/domain6/QContact.java");
assertContains(targetFile, "ListPath<PhoneNumber, QPhoneNumber> phoneNumbers");
targetFile = new File(gen, "com/querydsl/jpa/domain6/QPhoneNumber.java");
assertContains(targetFile, "QPhoneNumber extends BeanPath<PhoneNumber>",
assertContains(targetFile, "QPhoneNumber extends BeanPath<PhoneNumber>",
"StringPath number = createString(\"number\")");
CompileUtils.compile(gen.getAbsolutePath());
@ -42,5 +42,5 @@ public class DomainExporter6Test {
assertTrue(str + " was not contained", result.contains(str));
}
}
}

View File

@ -6,7 +6,7 @@ import java.util.List;
public class A {
public int id;
public List<B> b = new ArrayList<B>();
}

View File

@ -6,9 +6,9 @@ import java.util.List;
public class B {
public int id;
public List<C> c = new ArrayList<C>();
public A a;
}

View File

@ -1,9 +1,9 @@
package com.querydsl.jpa.domain7;
public class C {
public int id;
public B b;
}

View File

@ -22,12 +22,12 @@ public class DomainExporter7Test {
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain7/domain.hbm.xml"));
HibernateDomainExporter exporter = new HibernateDomainExporter("Q", gen, config);
exporter.execute();
assertTrue(new File(gen, "com/querydsl/jpa/domain7/QA.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain7/QB.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain7/QC.java").exists());
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -3,5 +3,5 @@ package com.querydsl.jpa.domain8;
public class A {
String property1;
}

View File

@ -1,7 +1,7 @@
package com.querydsl.jpa.domain8;
public class B extends A {
Long id;
String property2;

View File

@ -22,11 +22,11 @@ public class DomainExporter8Test {
config.addFile(new File("src/test/resources/com/querydsl/jpa/domain8/domain.hbm.xml"));
HibernateDomainExporter exporter = new HibernateDomainExporter("Q", gen, config);
exporter.execute();
assertTrue(new File(gen, "com/querydsl/jpa/domain8/QA.java").exists());
assertTrue(new File(gen, "com/querydsl/jpa/domain8/QB.java").exists());
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -23,5 +23,5 @@ public class DomainExporter9Test {
CompileUtils.compile(gen.getAbsolutePath());
}
}

View File

@ -1,7 +1,7 @@
package com.querydsl.jpa.domain9;
public abstract class EigentumPersonRechtsgueltig {
String id;
}

View File

@ -1,5 +1,5 @@
package com.querydsl.jpa.domain9;
public class EigentumPersonRechtsgueltigSnapshot extends EigentumPersonRechtsgueltig {
}