mirror of https://github.com/apache/openjpa.git
OPENJPA-2558 add proper logging for BooleanRepresentation
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1654485 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e54e9e79e
commit
244e37b189
|
@ -101,6 +101,7 @@ public class BooleanRepresentationFactory {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public static BooleanRepresentation valueOf(String booleanRepresentationKey, ClassLoader cl) {
|
||||
// 1st step, try to lookup the BooleanRepresentation from the default ones
|
||||
BooleanRepresentation booleanRepresentation = BUILTIN_BOOLEAN_REPRESENTATIONS.get(booleanRepresentationKey);
|
||||
|
@ -121,7 +122,6 @@ public class BooleanRepresentationFactory {
|
|||
}
|
||||
catch (Exception e) {
|
||||
// nothing to do
|
||||
//X TODO probably log some error?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,9 +133,6 @@ public class BooleanRepresentationFactory {
|
|||
));
|
||||
|
||||
}
|
||||
else {
|
||||
//X TODO add logging about which one got picked up finally
|
||||
}
|
||||
|
||||
return booleanRepresentation;
|
||||
}
|
||||
|
@ -192,6 +189,11 @@ public class BooleanRepresentationFactory {
|
|||
public Boolean getRepresentation(boolean bool) {
|
||||
return bool;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BooleanBooleanRepresentation";
|
||||
}
|
||||
}
|
||||
|
||||
public static class Int10BooleanRepresentation implements BooleanRepresentation<Integer> {
|
||||
|
@ -209,6 +211,11 @@ public class BooleanRepresentationFactory {
|
|||
public Integer getRepresentation(boolean bool) {
|
||||
return bool ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Int10BooleanRepresentation";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5689,6 +5689,9 @@ public class DBDictionary
|
|||
booleanRepresentation = evaluatedBooleanRepresentation != null
|
||||
? evaluatedBooleanRepresentation
|
||||
: BooleanRepresentationFactory.INT_10;
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info(_loc.get("using-booleanRepresentation", booleanRepresentation));
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isUsingRange(long start, long end) {
|
||||
|
|
|
@ -210,9 +210,9 @@ cannot-determine-identifier-base-case: Unable to determine the case to use for \
|
|||
identifiers. The default value of "{0}" will be used.
|
||||
can-not-execute: Unable to execute {0}.
|
||||
psql-owned-seq-warning: Unable to determine which sequences are owned by the database. \
|
||||
OpenJPA will consider all sequences suffixed with "_seq" as database managed. This \
|
||||
may result in improper creation or removal of sequences with this suffix. The \
|
||||
original PostgreSQL driver exception is being logged for your reference.
|
||||
OpenJPA will consider all sequences suffixed with "_seq" as database managed. This \
|
||||
may result in improper creation or removal of sequences with this suffix. The \
|
||||
original PostgreSQL driver exception is being logged for your reference.
|
||||
sequencesql-override: Going to override the DB2 specific default for the \
|
||||
DBDictionary.sequenceSQL string, which is: "{0}" \
|
||||
with the value of: "{1}", which is the default sequenceSQL string for DB2 on the give operating system. \
|
||||
|
@ -227,9 +227,11 @@ oracle-set-clob-warning: Setting the supportsSetClob property on the OracleDicti
|
|||
jdbc4-setbinarystream-unsupported: The JRE or JDBC level in use does not support the \
|
||||
JDBC 4.0 version of the "java.sql.PreparedStatement.setBinaryStream" method which is \
|
||||
necessary when the property "openjpa.jdbc.DBDictionary=useJDBC4SetBinaryStream" is \
|
||||
set to true. A prior version of this method will be used.
|
||||
set to true. A prior version of this method will be used.
|
||||
sequence-cache-warning: Setting the useNativeSequenceCache property on the DBDictionary no longer has an \
|
||||
effect. Code has been added to allow, by default, the functionality provided in previous releases \
|
||||
via the useNativeSequenceCache property.
|
||||
unknown-booleanRepresentation: Unknown BooleanRepresentation {0}. Value must be one of {1}.
|
||||
|
||||
unknown-booleanRepresentation: Unknown BooleanRepresentation {0}. Value must be one of {1}. You can also ˜\
|
||||
hand over a 'truerepresentation/falserepresentation' String or a fully qualified class name of your \
|
||||
own BooleanRepresentation implementation.
|
||||
using-booleanRepresentation: BooleanRepresentation {0} got picked up.
|
||||
|
|
Loading…
Reference in New Issue