001
014
015 package com.liferay.portal.dao.db;
016
017 import com.liferay.portal.kernel.dao.db.DB;
018 import com.liferay.portal.kernel.util.StringUtil;
019
020 import java.io.IOException;
021
022
027 public class JDataStoreDB extends FirebirdDB {
028
029 public static DB getInstance() {
030 return _instance;
031 }
032
033 @Override
034 public String buildSQL(String template) throws IOException {
035 template = convertTimestamp(template);
036 template = replaceTemplate(template, getTemplate());
037
038 template = reword(template);
039 template = StringUtil.replace(
040 template,
041 new String[] {"\\'", "\\\"", "\\\\", "\\n", "\\r"},
042 new String[] {"''", "\"", "\\", "\n", "\r"});
043
044 return template;
045 }
046
047 protected JDataStoreDB() {
048 super(TYPE_JDATASTORE);
049 }
050
051 @Override
052 protected String getServerName() {
053 return "jdatastore";
054 }
055
056 @Override
057 protected String[] getTemplate() {
058 return _JDATASTORE;
059 }
060
061 private static final String[] _JDATASTORE = {
062 "--", "TRUE", "FALSE", "'1970-01-01'", "current_timestamp", " binary",
063 " binary", " boolean", " date", " double", " integer", " bigint",
064 " long varchar", " long varchar", " varchar", "", "commit"
065 };
066
067 private static JDataStoreDB _instance = new JDataStoreDB();
068
069 }