-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,52 @@ | ||
package io.github.jklingsporn.vertx.jooq.generate.builder; | ||
|
||
import java.util.EnumSet; | ||
import java.util.Set; | ||
|
||
public class BuildOptions { | ||
|
||
public enum BuildFlag { | ||
DATA_OBJECT | ||
} | ||
|
||
private ConverterInstantiationMethod converterInstantiationMethod; | ||
private Set<BuildFlag> buildFlags; | ||
|
||
public BuildOptions() { | ||
this(ConverterInstantiationMethod.SINGLETON); | ||
this(ConverterInstantiationMethod.SINGLETON, EnumSet.noneOf(BuildFlag.class)); | ||
addBuildFlags(BuildFlag.DATA_OBJECT); | ||
} | ||
|
||
public BuildOptions(ConverterInstantiationMethod converterInstantiationMethod) { | ||
public BuildOptions(ConverterInstantiationMethod converterInstantiationMethod,Set<BuildFlag> buildFlags) { | ||
this.converterInstantiationMethod = converterInstantiationMethod; | ||
this.buildFlags = buildFlags; | ||
} | ||
|
||
public ConverterInstantiationMethod getConverterInstantiationMethod() { | ||
return converterInstantiationMethod; | ||
} | ||
|
||
public Set<BuildFlag> getBuildFlags() { | ||
return buildFlags; | ||
} | ||
|
||
public BuildOptions withConverterInstantiationMethod(ConverterInstantiationMethod converterInstantiationMethod) { | ||
this.converterInstantiationMethod = converterInstantiationMethod; | ||
return this; | ||
} | ||
|
||
public BuildOptions withBuildFlags(Set<BuildFlag> buildFlags) { | ||
this.buildFlags = buildFlags; | ||
return this; | ||
} | ||
|
||
public BuildOptions addBuildFlags(BuildFlag buildFlag) { | ||
this.buildFlags.add(buildFlag); | ||
return this; | ||
} | ||
|
||
boolean isEnabled(BuildFlag flag){ | ||
return buildFlags.contains(flag); | ||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.