Package org.eclnt.ccaddons.dof.util
Class DOFJdbcUtil
java.lang.Object
org.eclnt.ccaddons.dof.util.DOFJdbcUtil
Utilities for managing JDBC access.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckIfPropertyTypeIsClob(DOFPropertyType propertyType) static booleanstatic booleanstatic booleancreateDOFObjectTypeFromResultSet(String id, ResultSet resultSet) createFromResultSet(String queryId, ResultSet resultSet) createFromResultSet(String queryId, ResultSet resultSet, int maxCount) protected static DOFObjectcreateFromSingleResultSet(String queryId, ResultSet resultSet) createListEditor(String tableName) Create list editor for SQL table.createListEditor(String queryId, String query, IModeList modeList) Create list editor.createListEditor(String queryId, ResultSet resultSet, IModeList modeList) Create list editor.createListEditor(String tableName, IModeList modeList) Create list editor for SQL table.static DOFJdbcUtilType of database.protected DOFObjectTypegetObjectType(String queryId, ResultSet resultSet) static voidinitialize(String driverClassName, String connectionURL) Initialization of JDBC connection.static voidinitialize(String driverClassName, String connectionURL, String userName, String password) Initialization of JDBC connection.static voidinitialize(IJDBCConnectionProvider connectionProvider) Initialization of JDBC connection.static voidinitializeViaDataSource(String dataSourceName) static voidinitializeViaDataSource(String dataSourceName, String userName, String password) static DOFJdbcUtilinstance()Central factory method to obtain an instance of this util class.Create a JDBC connection, based on the JDBC connection information that was passed viainitialize(String, String).registerObjectTypeForTable(String queryId) protected static voidregisterResultSetInRepository(String queryId, ResultSet resultSet) voidsetConnectionURL(String connectionURL) voidsetDataSourceName(String dataSourceName) voidsetDbType(DOFJdbcDBType dbType) voidsetDbTypeById(String id) voidsetDriverClassName(String driverClassName) voidsetPassword(String password) voidsetUserName(String userName) voidupdateListEditor(DOFObjectListEditorUI listEditor, String queryId, String query) Update the content of the list editor.voidupdateListEditor(DOFObjectListEditorUI listEditor, String queryId, ResultSet resultSet) Update the content of the list editor.
-
Constructor Details
-
DOFJdbcUtil
public DOFJdbcUtil()
-
-
Method Details
-
instance
Central factory method to obtain an instance of this util class. -
designTimeInstance
-
initialize
Initialization of JDBC connection. To be called prior to any other functions. -
initialize
public static void initialize(String driverClassName, String connectionURL, String userName, String password) Initialization of JDBC connection. To be called prior to any other functions. -
initialize
Initialization of JDBC connection. To be called prior to any other functions. -
initializeViaDataSource
-
initializeViaDataSource
-
getDbType
Type of database. Use one of the DBTYPE* constants defined within this class. -
setDbType
-
setDbTypeById
-
getDriverClassName
-
setDriverClassName
-
getConnectionURL
-
setConnectionURL
-
getUserName
-
setUserName
-
getPassword
-
setPassword
-
getDataSourceName
-
setDataSourceName
-
createListEditor
Create list editor for SQL table. -
createListEditor
Create list editor for SQL table. -
createListEditor
Create list editor. The name of the queryId must be the name of the table that is edited.- Parameters:
queryId- Name of the table that is queried. E.g. "PERSON".query- Query that is executed for loading data. E.g. "SELECT * FROM PERSON".
-
updateListEditor
Update the content of the list editor. -
createListEditor
public DOFObjectListEditorUI createListEditor(String queryId, ResultSet resultSet, IModeList modeList) Create list editor. The name of the queryId must be the name of the table that is edited.- Parameters:
queryId- Name of the table that is queried. E.g. "PERSON".resultSet- Result set of data that should be displayed within the list editor.
-
updateListEditor
Update the content of the list editor. -
getObjectType
-
createFromResultSet
-
createFromResultSet
-
createFromSingleResultSet
-
registerResultSetInRepository
-
createDOFObjectTypeFromResultSet
-
pickConnection
Create a JDBC connection, based on the JDBC connection information that was passed viainitialize(String, String). -
checkIfSQLSelectTopIsSupported
public static boolean checkIfSQLSelectTopIsSupported() -
checkIfSQLSelectFirstIsSupported
public static boolean checkIfSQLSelectFirstIsSupported() -
checkIfSQLSelectLimitIsSupported
public static boolean checkIfSQLSelectLimitIsSupported() -
registerObjectTypeForTable
-
checkIfPropertyTypeIsClob
-