#384 - ENH: Add findVersionsBetween(start, end) ... including implementation support for Oracle total recall

This commit is contained in:
Robin Bygrave committed 2015-08-18 23:57:11 +12:00
1 parent 75e9770d5e
commit 580b51381e
16 files changed
+170 -19

No files matched your search

@@ -29,9 +29,12 @@ public class AnnotationClass extends AnnotationParser {
private final String asOfViewSuffix;
public AnnotationClass(DeployBeanInfo<?> info, boolean validationAnnotations, String asOfViewSuffix) {
private final String versionsBetweenSuffix;
public AnnotationClass(DeployBeanInfo<?> info, boolean validationAnnotations, String asOfViewSuffix, String versionsBetweenSuffix) {
super(info, validationAnnotations);
this.asOfViewSuffix = asOfViewSuffix;
this.versionsBetweenSuffix = versionsBetweenSuffix;
}
/**
@@ -52,7 +55,7 @@ public class AnnotationClass extends AnnotationParser {
// default the TableName using NamingConvention.
TableName tableName = namingConvention.getTableName(descriptor.getBeanType());
descriptor.setBaseTable(tableName, asOfViewSuffix);
descriptor.setBaseTable(tableName, asOfViewSuffix, versionsBetweenSuffix);
}
}
@@ -21,6 +21,8 @@ public class ReadAnnotations {
*/
private final String asOfViewSuffix;
private final String versionsBetweenSuffix;
/**
* True if the javax validation annotations are present in the classpath.
*/
@@ -31,9 +33,10 @@ public class ReadAnnotations {
*/
private final boolean jacksonAnnotations;
public ReadAnnotations(GeneratedPropertyFactory generatedPropFactory, String asOfViewSuffix) {
public ReadAnnotations(GeneratedPropertyFactory generatedPropFactory, String asOfViewSuffix, String versionsBetweenSuffix) {
this.generatedPropFactory = generatedPropFactory;
this.asOfViewSuffix = asOfViewSuffix;
this.versionsBetweenSuffix = versionsBetweenSuffix;
this.javaxValidationAnnotations = ClassUtil.isJavaxValidationAnnotationsPresent();
this.jacksonAnnotations = ClassUtil.isJacksonAnnotationsPresent();
}
@@ -48,12 +51,11 @@ public class ReadAnnotations {
public void readInitial(DeployBeanInfo<?> info, boolean eagerFetchLobs) {
try {
new AnnotationClass(info, javaxValidationAnnotations, asOfViewSuffix).parse();
new AnnotationClass(info, javaxValidationAnnotations, asOfViewSuffix, versionsBetweenSuffix).parse();
new AnnotationFields(generatedPropFactory, info, javaxValidationAnnotations, jacksonAnnotations, eagerFetchLobs).parse();
} catch (RuntimeException e) {
String msg = "Error reading annotations for " + info;
throw new RuntimeException(msg, e);
throw new RuntimeException("Error reading annotations for " + info, e);
}
}