// Trace message
this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName)); //NOI18N
- // First all lower case
- String lower = columnName.toLowerCase();
-
- // Then split on "_"
- StringTokenizer tokenizer = new StringTokenizer(lower, "_"); //NOI18N
+ // Split on "_"
+ StringTokenizer tokenizer = new StringTokenizer(columnName, "_"); //NOI18N
// Resulting string
StringBuilder builder = new StringBuilder(tokenizer.countTokens());
*
* @param str String to tokenize and get array from
* @param delimiter Delimiter
- * @param size Size of array
* @return Array from tokenized string
- * @todo Get rid of size parameter
+ * TODO Get rid of size parameter
*/
- protected String[] getArrayFromString (final String str, final String delimiter, final int size) {
+ protected String[] getArrayFromString (final String str, final String delimiter) {
// Trace message
- this.getLogger().trace(MessageFormat.format("str={0},delimiter={1},size={2} - CALLED!", str, delimiter, size)); //NOI18N
+ this.getLogger().trace(MessageFormat.format("str={0},delimiter={1} - CALLED!", str, delimiter)); //NOI18N
// Get tokenizer
StringTokenizer tokenizer = new StringTokenizer(str, delimiter);
// Init array and index
- String[] tokens = new String[size];
+ String[] tokens = new String[tokenizer.countTokens()];
int index = 0;
// Run through all tokens
object = null;
} else {
// Hard-coded "cast" again ... :-(
- // @TODO Can't we get rid of this???
+ // TODO Can't we get rid of this???
switch (type.getSimpleName()) {
case "Long": // Long object //NOI18N
object = Long.parseLong((String) value);
* @throws java.lang.IllegalAccessException If the setter cannot be accessed
* @throws java.lang.reflect.InvocationTargetException Any other problem?
*/
- protected void setValueInStoreableFromColumn (final Storable instance, final String targetClass, final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ protected void setValueInStorableFromColumn (final Storable instance, final String targetClass, final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
this.getLogger().trace(MessageFormat.format("instance={0},targetClass={1},columnName={2},value={3} - CALLED!", instance, targetClass, columnName, value)); //NOI18N
* @throws java.lang.IllegalAccessException If the getter cannot be accessed
* @throws java.lang.reflect.InvocationTargetException Some other problems?
*/
- protected Object getValueInStoreableFromColumn (final Storable instance, final String targetClass, final String columnName) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ protected Object getValueInStorableFromColumn (final Storable instance, final String targetClass, final String columnName) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
this.getLogger().trace(MessageFormat.format("instance={0},targetClass={1},columnName={2} - CALLED!", instance, targetClass, columnName)); //NOI18N
// Search for proper field instance
for (final Field field : fields) {
// Is a dollar character there?
- if (field.getName().startsWith("$")) {
+ if (field.getName().startsWith("$")) { //NOI18N
// Debug message
- this.getLogger().debug("Field name " + field.getName() + " starts with a dollar, skipped.");
+ this.getLogger().debug(MessageFormat.format("Field name {0} starts with a dollar, skipped.", field.getName())); //NOI18N
// Skip this
continue;
}