| Chunk |
|---|
| Conflicting content |
|---|
import java.util.Map; package org.synyx.messagesource; <<<<<<< HEAD ======= import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.ResourceBundle; >>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735 import org.springframework.beans.factory.InitializingBean; import org.springframework.context.MessageSource; import org.springframework.context.support.AbstractMessageSource; |
| Solution content |
|---|
package org.synyx.messagesource; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.MessageSource; import org.springframework.context.support.AbstractMessageSource; |
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
* You may set no defaultLocale which leads to resolving without the lines above containing (property defaultLocale, * if not null). * *You must set a {@link MessageProvider} which gets called to read all the messages at once. * *You may set a basename or a List of basenames explicitly. If you do so this only messages for this basename(s) are * resolved (and read from the {@link MessageProvider}). If you do not provide a basename all the messages delivered * from the {@link MessageProvider} are used. * * @author Marc Kannegiesser - kannegiesser@synyx.de ======= ** You may set no defaultLocale which leads to resolving without the lines above containing (property defaultLocale, if * not null). * ** You must set a {@link MessageProvider} which gets called to read all the messages at once. * ** You may set a basename or a List of basenames explicitly. If you do so this only messages for this basename(s) are * resolved (and read from the {@link MessageProvider}). If you do not provide a basename all the messages delivered * from the {@link MessageProvider} are used. * * * @author Marc Kannegiesser - kannegiesser@synyx.de >>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735 */ public class InitializableMessageSource extends AbstractMessageSource implements InitializingBean { |
| Solution content |
|---|
* You may set no defaultLocale which leads to resolving without the lines above containing (property defaultLocale, * if not null). * *You must set a {@link MessageProvider} which gets called to read all the messages at once. * *You may set a basename or a List of basenames explicitly. If you do so this only messages for this basename(s) are * resolved (and read from the {@link MessageProvider}). If you do not provide a basename all the messages delivered * from the {@link MessageProvider} are used. * * @author Marc Kannegiesser - kannegiesser@synyx.de */ public class InitializableMessageSource extends AbstractMessageSource implements InitializingBean { |
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
protected Map |
| Solution content |
|---|
protected Map |
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Blank |
| Chunk |
|---|
| Conflicting content |
|---|
protected List |
| Solution content |
|---|
protected List |
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
<<<<<<< HEAD
* Reads all messages from the {@link MessageProvider} for the given Basename.
*
* @param basename the basename to initialize messages for
=======
* Reads all messages from the {@link MessageProvider} for the given Basename
*
* @param basename the basename to initialize messages for
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
protected void initialize(String basename) {
|
| Solution content |
|---|
/**
* Reads all messages from the {@link MessageProvider} for the given Basename.
*
* @param basename the basename to initialize messages for
*/
protected void initialize(String basename) {
|
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* Sets the default {@link Locale} used during message-resolving. If for a given Locale the message is not found the
* message gets looked up for the default-locale. If the message is not found then the "base-message" is used. This
* is allowed to be null which then means "no default locale"
<<<<<<< HEAD
*
* @param defaultLocale the Locale to use as default or null if no default-locale should be used
=======
*
* @param defaultLocale the Locale to use as default or null if no default-locale should be used
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public void setDefaultLocale(Locale defaultLocale) {
|
| Solution content |
|---|
* Sets the default {@link Locale} used during message-resolving. If for a given Locale the message is not found the
* message gets looked up for the default-locale. If the message is not found then the "base-message" is used. This
* is allowed to be null which then means "no default locale"
*
* @param defaultLocale the Locale to use as default or null if no default-locale should be used
*/
public void setDefaultLocale(Locale defaultLocale) {
|
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Sets the {@link MessageProvider} for this which is asked for all its Messages during initialisation.
<<<<<<< HEAD
*
* @param messageProvider the {@link MessageProvider} to use
=======
*
* @param messageProvider the {@link MessageProvider} to use
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public void setMessageProvider(MessageProvider messageProvider) {
|
| Solution content |
|---|
/**
* Sets the {@link MessageProvider} for this which is asked for all its Messages during initialisation.
*
* @param messageProvider the {@link MessageProvider} to use
*/
public void setMessageProvider(MessageProvider messageProvider) {
|
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* Sets a single basename for this. This cannot be used in combination with {@link #setBasenames(List)}. If neither
* {@link #setBasename(String)} nor {@link #setBasenames(List)} is called the basenames are looked up from the
* {@link MessageProvider}
<<<<<<< HEAD
*
* @param basename the single basename to use for this instance
=======
*
* @param basename the single basename to use for this instance
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public void setBasename(String basename) {
|
| Solution content |
|---|
* Sets a single basename for this. This cannot be used in combination with {@link #setBasenames(List)}. If neither
* {@link #setBasename(String)} nor {@link #setBasenames(List)} is called the basenames are looked up from the
* {@link MessageProvider}
*
* @param basename the single basename to use for this instance
*/
public void setBasename(String basename) {
|
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* Sets a {@link List} of basenames to use for this instance. This cannot be used in combination with
* {@link #setBasename(String)}. If neither {@link #setBasename(String)} nor {@link #setBasenames(List)} is called
* the basenames are looked up from the {@link MessageProvider}
<<<<<<< HEAD
*
* @param basenames the {@link List} of basenames
=======
*
* @param basenames the {@link List} of basenames
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public void setBasenames(List |
| Solution content |
|---|
* Sets a {@link List} of basenames to use for this instance. This cannot be used in combination with
* {@link #setBasename(String)}. If neither {@link #setBasename(String)} nor {@link #setBasenames(List)} is called
* the basenames are looked up from the {@link MessageProvider}
*
* @param basenames the {@link List} of basenames
*/
public void setBasenames(List |
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
<<<<<<< HEAD
* Callback to call {@link #initialize()} after construction of this using a Spring-Callback.
=======
* Callback to call {@link #initialize()} after construction of this using a Spring-Callback
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public void afterPropertiesSet() throws Exception {
|
| Solution content |
|---|
/**
* Callback to call {@link #initialize()} after construction of this using a Spring-Callback.
*/
public void afterPropertiesSet() throws Exception {
|
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
<<<<<<< HEAD
* Sets the.
*
* @param autoInitialize
=======
* Sets the
*
* @param autoInitialize
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public void setAutoInitialize(boolean autoInitialize) {
|
| Solution content |
|---|
/**
* Sets the.
*
* @param autoInitialize
*/
public void setAutoInitialize(boolean autoInitialize) {
|
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
this.autoInitialize = autoInitialize;
}
<<<<<<< HEAD
/**
* @return |
| Solution content |
|---|
*/
this.autoInitialize = autoInitialize;
}
/**
* @return |
| File |
|---|
| InitializableMessageSource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
/**
<<<<<<< HEAD
* Helper-Class that holds informations about a Bundle.
*
* @author Marc Kannegiesser - kannegiesser@synyx.de
=======
* Helper-Class that holds informations about a Bundle
*
* @author Marc Kannegiesser - kannegiesser@synyx.de
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
class BundleInfo { |
| Solution content |
|---|
*
/**
* Helper-Class that holds informations about a Bundle.
* @author Marc Kannegiesser - kannegiesser@synyx.de
*/
class BundleInfo { |
| File |
|---|
| BundleInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
Locale locale;
File file;
<<<<<<< HEAD
private String propertyFileLoaderEncoding = null;
/**
* Creates a new instance.
*
* @param file
* @param basename
=======
/**
* Creates a new instance
*
* @param file
* @param basename
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public BundleInfo(File file, String basename) {
|
| Solution content |
|---|
Locale locale;
File file;
private String propertyFileLoaderEncoding = null;
/**
* Creates a new instance.
*
* @param file
* @param basename
*/
public BundleInfo(File file, String basename) {
|
| File |
|---|
| BundleInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
String localeString = fileName.substring(prefixLength, fileName.length() - postfixLength);
locale = LocaleUtils.toLocale(localeString);
<<<<<<< HEAD
this.propertyFileLoaderEncoding = propertyFileLoaderEncoding;
=======
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
}
/** |
| Solution content |
|---|
String localeString = fileName.substring(prefixLength, fileName.length() - postfixLength);
locale = LocaleUtils.toLocale(localeString);
this.propertyFileLoaderEncoding = propertyFileLoaderEncoding;
}
/** |
| File |
|---|
| BundleInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* Returns a {@link Map} containing the messages for the given file.
*
* @return the messages for the given bundle
=======
* Returns a {@link Map} containing the messages for the given file
*
* @return the messages for the given bundle
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public Map |
| Solution content |
|---|
}
/**
* Returns a {@link Map} containing the messages for the given file.
*
* @return the messages for the given bundle
*/
public Map |
| File |
|---|
| BundleInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Loads {@link Properties} from the given {@link File} while handling errors.
<<<<<<< HEAD
*
* @param file the file to load from
*
* @return the {@link Properties} loaded
=======
*
* @param file the file to load from
* @return the {@link Properties} loaded
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
private Properties loadProperties(File file, String encoding) { |
| Solution content |
|---|
/**
* Loads {@link Properties} from the given {@link File} while handling errors.
*
* @param file the file to load from
*
* @return the {@link Properties} loaded
*/
private Properties loadProperties(File file, String encoding) { |
| File |
|---|
| BundleInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
=======
}
}
}
<<<<<<< HEAD
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
} |
| Solution content |
|---|
}
}
}
} |
| File |
|---|
| BundleInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Blank |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* {@link MessageProvider} for messages read from a directory. This acts also as a {@link MessageAcceptor} that can
* write files to the given directory.
<<<<<<< HEAD
*
* @author Marc Kannegiesser - kannegiesser@synyx.de
=======
*
* @author Marc Kannegiesser - kannegiesser@synyx.de
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public class FileSystemMessageProvider implements MessageProvider, MessageAcceptor {
|
| Solution content |
|---|
/**
* {@link MessageProvider} for messages read from a directory. This acts also as a {@link MessageAcceptor} that can
* write files to the given directory.
*
* @author Marc Kannegiesser - kannegiesser@synyx.de
*/
public class FileSystemMessageProvider implements MessageProvider, MessageAcceptor {
|
| File |
|---|
| FileSystemMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Creates a new instance reading from the path represented by the given {@link String}.
<<<<<<< HEAD
*
* @param basePath the path to the directory to read from
=======
*
* @param basePath the path to the directory to read from
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public FileSystemMessageProvider(String basePath) {
|
| Solution content |
|---|
/**
* Creates a new instance reading from the path represented by the given {@link String}.
*
* @param basePath the path to the directory to read from
*/
public FileSystemMessageProvider(String basePath) {
|
| File |
|---|
| FileSystemMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Creates a new instance reading from the path represented by the given {@link File}.
<<<<<<< HEAD
*
* @param baseDir the path to the directory to read from
=======
*
* @param baseDir the path to the directory to read from
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
*/
public FileSystemMessageProvider(File baseDir) {
|
| Solution content |
|---|
/**
* Creates a new instance reading from the path represented by the given {@link File}.
*
* @param baseDir the path to the directory to read from
*/
public FileSystemMessageProvider(File baseDir) {
|
| File |
|---|
| FileSystemMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
<<<<<<< HEAD
* Returns {@link BundleInfo}s for all files in the directory matching the given basename.
*
* @param basename
*
=======
* Returns {@link BundleInfo}s for all files in the directory matching the given basename
*
* @param basename
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
* @return
*/
private List |
| Solution content |
|---|
/**
* Returns {@link BundleInfo}s for all files in the directory matching the given basename.
*
* @param basename
*
* @return
*/
private List |
| File |
|---|
| FileSystemMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Returns a (maybe not existing) file for the given basename and {@link Locale}.
<<<<<<< HEAD
*
* @param basename
* @param locale
*
=======
*
* @param basename
* @param locale
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
* @return
*/
private File getFileFor(String basename, Locale locale) { |
| Solution content |
|---|
/**
* Returns a (maybe not existing) file for the given basename and {@link Locale}.
*
* @param basename
* @param locale
*
* @return
*/
private File getFileFor(String basename, Locale locale) { |
| File |
|---|
| FileSystemMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public class JdbcMessageProvider implements MessageProvider, MessageAcceptor {
<<<<<<< HEAD
protected static final String QUERY_INSERT_MESSAGE =
"INSERT INTO %s (%s, %s, %s, %s, %s, %s) VALUES (?, ?, ?, ?, ?, ?)";
protected static final String QUERY_DELETE_MESSAGES = "DELETE FROM %s WHERE %s = ?";
protected static final String QUERY_SELECT_BASENAMES = "SELECT DISTINCT %s from %s";
protected static final String QUERY_SELECT_MESSAGES = "SELECT %s,%s,%s,%s,%s FROM %s WHERE %s = ?";
=======
private static final String QUERY_INSERT = "INSERT INTO %s (%s, %s, %s, %s, %s, %s) VALUES (?, ?, ?, ?, ?, ?)";
private static final String QUERY_DELETE = "DELETE FROM %s WHERE %s = ?";
private static final String QUERY_SELECT_BASENAMES = "SELECT DISTINCT %s from %s";
private static final String QUERY_SELECT_MESSAGES = "SELECT %s,%s,%s,%s,%s FROM %s WHERE %s = ?";
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
private JdbcTemplate template;
|
| Solution content |
|---|
*/
public class JdbcMessageProvider implements MessageProvider, MessageAcceptor {
protected static final String QUERY_INSERT_MESSAGE =
"INSERT INTO %s (%s, %s, %s, %s, %s, %s) VALUES (?, ?, ?, ?, ?, ?)";
protected static final String QUERY_DELETE_MESSAGES = "DELETE FROM %s WHERE %s = ?";
protected static final String QUERY_SELECT_BASENAMES = "SELECT DISTINCT %s from %s";
protected static final String QUERY_SELECT_MESSAGES = "SELECT %s,%s,%s,%s,%s FROM %s WHERE %s = ?";
private JdbcTemplate template;
|
| File |
|---|
| JdbcMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
public Messages getMessages(String basename) {
String query =
<<<<<<< HEAD
String.format(getSelectMessagesQuery(), addDelimiter(languageColumn), addDelimiter(countryColumn),
=======
String.format(QUERY_SELECT_MESSAGES, addDelimiter(languageColumn), addDelimiter(countryColumn),
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
addDelimiter(variantColumn), addDelimiter(keyColumn), addDelimiter(messageColumn),
addDelimiter(tableName), addDelimiter(basenameColumn));
|
| Solution content |
|---|
public Messages getMessages(String basename) {
String query =
String.format(getSelectMessagesQuery(), addDelimiter(languageColumn), addDelimiter(countryColumn),
addDelimiter(variantColumn), addDelimiter(keyColumn), addDelimiter(messageColumn),
addDelimiter(tableName), addDelimiter(basenameColumn));
|
| File |
|---|
| JdbcMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
deleteMessages(basename);
String query =
<<<<<<< HEAD
String.format(getInsertMessageQuery(), addDelimiter(tableName), addDelimiter(basenameColumn),
=======
String.format(QUERY_INSERT, addDelimiter(tableName), addDelimiter(basenameColumn),
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
addDelimiter(languageColumn), addDelimiter(countryColumn), addDelimiter(variantColumn),
addDelimiter(keyColumn), addDelimiter(messageColumn));
|
| Solution content |
|---|
deleteMessages(basename);
String query =
String.format(getInsertMessageQuery(), addDelimiter(tableName), addDelimiter(basenameColumn),
addDelimiter(languageColumn), addDelimiter(countryColumn), addDelimiter(variantColumn),
addDelimiter(keyColumn), addDelimiter(messageColumn));
|
| File |
|---|
| JdbcMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
<<<<<<< HEAD
/*
* (non-Javadoc)
*
* @see org.synyx.messagesource.MessageProvider#getAvailableBaseNames()
*/
public List |
| Solution content |
|---|
}
/*
* (non-Javadoc)
*
* @see org.synyx.messagesource.MessageProvider#getAvailableBaseNames()
*/
public List |
| File |
|---|
| JdbcMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* Returns the delimiter used within queries to delimit table- and column-names
/**
<<<<<<< HEAD
* Method that "wraps" a field-name (or table-name) into the delimiter.
*
* @param name the name of the field/table
* @return the wrapped field/table
*/
protected String addDelimiter(String name) {
return String.format("%s%s%s", delimiter, name, delimiter);
}
/**
*
* @return the delimiter
*/
public String getDelimiter() {
return delimiter;
}
/**
* Sets the delimiter used within queries to delimit table- and column-names (defaults to `). Must not be null.
*
* @param delimiter the delimiter to use
*/
public void setDelimiter(String delimiter) {
Assert.notNull(delimiter);
this.delimiter = delimiter;
}
/**
* Returns the name of the column holding the information about the basename (string-type)
*
* @return the name of the basename-column
*/
public String getBasenameColumn() {
return basenameColumn;
}
/**
* Sets the name of the column holding the information about the basename (string-type)
*
* @param basenameColumn the name of the basename-column
*/
public void setBasenameColumn(String basenameColumn) {
this.basenameColumn = basenameColumn;
}
/**
* Returns the name of the table containing the messages
*
* @return the name of the table containing the messages
*/
public String getTableName() {
return tableName;
}
/**
* Sets the name of the table containing the messages
*
* @param tableName the name of the table containing the messages
*/
public void setTableName(String tableName) {
Assert.notNull(tableName);
this.tableName = tableName;
}
/**
* Sets the {@link DataSource} where connections can be created to the database containing the table with messages
*
* @param dataSource the {@link DataSource} to set
*/
public void setDataSource(DataSource dataSource) {
Assert.notNull(dataSource);
this.template = new JdbcTemplate(dataSource);
}
/**
=======
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
* Returns the name of the column holding the information about the language (string-type)
*
* @return the name of the column holding the information about the language (string-type) |
| Solution content |
|---|
}
/**
/**
/**
* Method that "wraps" a field-name (or table-name) into the delimiter.
*
* @param name the name of the field/table
* @return the wrapped field/table
*/
protected String addDelimiter(String name) {
return String.format("%s%s%s", delimiter, name, delimiter);
}
/**
* Returns the delimiter used within queries to delimit table- and column-names
*
* @return the delimiter
*/
public String getDelimiter() {
return delimiter;
}
* Sets the delimiter used within queries to delimit table- and column-names (defaults to `). Must not be null.
*
* @param delimiter the delimiter to use
*/
public void setDelimiter(String delimiter) {
Assert.notNull(delimiter);
this.delimiter = delimiter;
* Returns the name of the column holding the information about the basename (string-type)
*
* @return the name of the basename-column
*/
public String getBasenameColumn() {
return basenameColumn;
}
/**
* Sets the name of the column holding the information about the basename (string-type)
*
* @param basenameColumn the name of the basename-column
*/
public void setBasenameColumn(String basenameColumn) {
this.basenameColumn = basenameColumn;
}
/**
* Returns the name of the table containing the messages
*
* @return the name of the table containing the messages
*/
public String getTableName() {
return tableName;
}
/**
* Sets the name of the table containing the messages
*
* @param tableName the name of the table containing the messages
*/
public void setTableName(String tableName) {
Assert.notNull(tableName);
this.tableName = tableName;
}
/**
* Sets the {@link DataSource} where connections can be created to the database containing the table with messages
*
* @param dataSource the {@link DataSource} to set
*/
public void setDataSource(DataSource dataSource) {
Assert.notNull(dataSource);
this.template = new JdbcTemplate(dataSource);
}
/**
* Returns the name of the column holding the information about the language (string-type)
*
* @return the name of the column holding the information about the language (string-type) |
| File |
|---|
| JdbcMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
this.messageColumn = messageColumn;
}
<<<<<<< HEAD
/**
* Helper that extracts messages from a resultset
**/
=======
/**
* Returns the name of the table containing the messages
*
* @return the name of the table containing the messages
*/
public String getTableName() {
return tableName;
}
/**
* Returns the name of the column holding the information about the basename (string-type)
*
* @return the name of the basename-column
*/
public String getBasenameColumn() {
return basenameColumn;
}
/**
* Sets the name of the column holding the information about the basename (string-type)
*
* @param basenameColumn the name of the basename-column
*/
public void setBasenameColumn(String basenameColumn) {
this.basenameColumn = basenameColumn;
}
/**
* Sets the name of the table containing the messages
*
* @param tableName the name of the table containing the messages
*/
public void setTableName(String tableName) {
Assert.notNull(tableName);
this.tableName = tableName;
}
/**
* Sets the {@link DataSource} where connections can be created to the database containing the table with messages
*
* @param dataSource the {@link DataSource} to set
*/
public void setDataSource(DataSource dataSource) {
Assert.notNull(dataSource);
this.template = new JdbcTemplate(dataSource);
}
/*
* Helper that extracts messages from a resultset
*/
>>>>>>> 6384e64f7bab7827c21cf86fa6aeed84186ca735
class MessageExtractor implements ResultSetExtractor |
| Solution content |
|---|
this.messageColumn = messageColumn;
}
/**
* Helper that extracts messages from a resultset
**/
class MessageExtractor implements ResultSetExtractor |
| File |
|---|
| JdbcMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
}
<<<<<<< HEAD
=======
/**
* Returns the delimiter used within queries to delimit table- and column-names
*
* @return the delimiter
*/
public String getDelimiter() {
return delimiter;
}
/**
* Sets the delimiter used within queries to delimit table- and column-names (defaults to `). Must not be null.
*
* @param delimiter the delimiter to use
*/
public void setDelimiter(String delimiter) {
Assert.notNull(delimiter);
this.delimiter = delimiter;
}
/*
* (non-Javadoc)
*
* @see org.synyx.messagesource.MessageProvider#getAvailableBaseNames()
*/
public List |
| Solution content |
|---|
}
} |
| File |
|---|
| JdbcMessageProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |