Skip to content

Commit

Permalink
fixed to work with new functional-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrimatti committed Aug 17, 2014
1 parent 3fb23e9 commit 9b38991
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.hibernate.usertype.CompositeUserType;
import org.hibernate.usertype.UserType;

import fi.solita.utils.functional.Apply;
import fi.solita.utils.functional.Function0;
import fi.solita.utils.functional.Functional;
import fi.solita.utils.functional.Pair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public static class Options {
public ExtendedGeneratorOptions generatorOptions() {
final boolean makeFieldsPublic = JpaConstructorProcessor.this.makeFieldsPublic();
final boolean onlyPublicMembers = JpaConstructorProcessor.this.onlyPublicMembers();
final String generatedPackagePattern = JpaConstructorProcessor.this.generatedPackagePattern();
final String generatedClassNamePattern = JpaConstructorProcessor.this.generatedClassNamePattern();
return new ExtendedGeneratorOptions() {
@Override
public boolean makeFieldsPublic() {
Expand All @@ -46,10 +48,18 @@ public boolean makeFieldsPublic() {
public boolean onlyPublicMembers() {
return onlyPublicMembers;
}
@Override
public String generatedPackagePattern() {
return generatedPackagePattern;
}
@Override
public String generatedClassNamePattern() {
return generatedClassNamePattern;
}
};
}

public static class ExtendedGeneratorOptions extends CommonMetadataProcessor.CombinedGeneratorOptions implements ConstructorsAsJpaProjections.Options {
public static abstract class ExtendedGeneratorOptions extends CommonMetadataProcessor.CombinedGeneratorOptions implements ConstructorsAsJpaProjections.Options {
@SuppressWarnings("rawtypes")
@Override
public Class<? extends Apply> getClassForJpaConstructors(int argCount) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,26 @@ public static class Options {
@Override
public ExtendedGeneratorOptions generatorOptions() {
final boolean onlyPublicMembers = JpaMetamodelProcessor.this.onlyPublicMembers();
final String generatedPackagePattern = JpaMetamodelProcessor.this.generatedPackagePattern();
final String generatedClassNamePattern = JpaMetamodelProcessor.this.generatedClassNamePattern();
return new ExtendedGeneratorOptions() {
public boolean onlyPublicMembers() {
return onlyPublicMembers;
}

@Override
public String generatedPackagePattern() {
return generatedPackagePattern;
}

@Override
public String generatedClassNamePattern() {
return generatedClassNamePattern;
}
};
}

public static class ExtendedGeneratorOptions extends CommonMetadataProcessor.CombinedGeneratorOptions implements JpaMetamodel.Options {
public static abstract class ExtendedGeneratorOptions extends CommonMetadataProcessor.CombinedGeneratorOptions implements JpaMetamodel.Options {
}

public List<Generator<? super ExtendedGeneratorOptions>> generators() {
Expand Down

0 comments on commit 9b38991

Please sign in to comment.