|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.miningmart.db.DB
public class DB
The class DB handles all actions which have to be executed on the database: it makes the connect to a DB on construction and disconnect from the database on finalization, it reads from the metaschema and writes into it. The read data from the database is stored in the corresponding class structure. On writing the information has to be available in the corresponding class structure For each compiler run exactly one object of this class exists. It provides the cache for all M4 objects (ie for their Java representation objects).
| Field Summary | |
|---|---|
protected DbCore |
busiDbc
|
static java.lang.String |
C_BA
The String for type "BaseAttribute" used in the M4 schema. |
static java.lang.String |
C_CONC
The String for type "Concept" used in the M4 schema. |
static java.lang.String |
c_db
|
static java.lang.String |
C_FEA
The String for type "Feature" used in the M4 schema. |
static java.lang.String |
c_input
|
static java.lang.String |
C_MCF
The String for type "MultiColumnFeature" used in the M4 schema. |
static java.lang.String |
c_mining
|
static java.lang.String |
c_no
|
static java.lang.String |
c_output
|
static java.lang.String |
C_REL
The String for type "Relation" used in the M4 schema. |
static java.lang.String |
C_VAL
The String for type "Value" used in the M4 schema. |
static java.lang.String |
c_yes
|
protected M4InterfaceContext |
cal
|
protected boolean |
computeAllStat
|
static java.util.HashMap |
dirtyObjectSets
The data structure for dirty objects. |
protected DbCore |
m4Dbc
|
static short |
MYSQL
Constant to indicate a MySql DBMS. |
static short |
NO_DBMS
Constant to indicate no (or an unsupported) DBMS. |
static short |
ORACLE
Constant to indicate an Oracle DBMS. |
static java.lang.String[] |
ORDER_FOR_WRITING
Writing the objects in this order prevents us from violating all dependencies except for those between objects in the same table. |
static short |
POSTGRES
Constant to indicate a Postgres DBMS. |
static boolean |
READ_ONLY
Currently for debugging only, although we should provide a read-only mode. |
| Constructor Summary | |
|---|---|
DB(ConfigReader cr,
boolean computeStatistics,
M4InterfaceContext cal)
This constructor uses the M4 and Business data connection information that is available from the given ConfigReader object. |
|
DB(DB db,
M4InterfaceContext m4i)
|
|
DB(java.lang.String m4Url,
java.lang.String m4DbName,
java.lang.String m4User,
java.lang.String m4Passwd,
java.lang.String dataUrl,
java.lang.String dataDbName,
java.lang.String dataUser,
java.lang.String dataPasswd,
boolean computeStatistics,
M4InterfaceContext cal)
The constructor of this class establishes two new database connections. |
|
| Method Summary | |
|---|---|
boolean |
areSomeStatisticsStored(Columnset cs)
This method checks if any statistics for the given columnset are available in the database, so that they do not have to be computed. |
static java.lang.String |
attribPrefix(java.lang.String attributeName,
java.lang.String prefix)
This method returns a String which can be used to query the database for the given attribute, which should be of type VARCHAR, with the given prefix. |
static java.lang.String |
checkDouble(java.lang.String test)
Tests if the given String contains a double, and changes funny oracle-formats to java convention. |
void |
clearM4Cache()
Emtpies the Cache of M4 objects. |
static java.lang.String |
closeResultSet(java.sql.ResultSet rs)
This is a service method to comfortably close ResultSets. |
void |
commitBusinessTransactions()
Commit the last transactions in the business database. |
void |
commitM4Transactions()
Commit the last transactions in the M4 database. |
Columnset |
createColumnsetFromTable(java.lang.String tableName)
|
M4Object |
createNewInstance(java.lang.Class c)
This method creates actual instances of M4Object classes. |
void |
createReverseStepTable()
Creates a table called REVSTEP_T in the M4 schema which is used to link steps that reverse a feature construction to the step that constructed the feature. |
boolean |
createSQLView(Columnset cs)
Create the generated sql definition for a new view or table within the database. |
protected void |
doPrint(java.lang.Exception ex)
|
protected void |
doPrint(java.util.logging.Level verbosity,
java.lang.String message)
|
boolean |
dropBusinessTable(java.lang.String tableName)
Try to drop the table with the given name in the business schema, if it exists there. |
boolean |
dropM4Table(java.lang.String tableName)
Try to drop the table with the given name in the M4 schema, if it exists there. |
java.lang.String |
executeBusinessSingleValueSqlRead(java.lang.String query)
|
java.lang.Long |
executeBusinessSingleValueSqlReadL(java.lang.String query)
|
java.sql.ResultSet |
executeBusinessSqlRead(java.lang.String query)
Method to comfortably read from the business database. |
void |
executeBusinessSqlWrite(java.lang.String query)
Method to comfortably write to the business database. |
java.lang.String |
executeM4SingleValueSqlRead(java.lang.String query)
|
java.lang.Long |
executeM4SingleValueSqlReadL(java.lang.String query)
|
java.sql.ResultSet |
executeM4SqlRead(java.lang.String query)
Method to comfortably read from the M4 database. |
void |
executeM4SqlWrite(java.lang.String query)
Method to comfortably write to the M4 database. |
java.lang.String |
getAliasExpressionForInnerSelects(java.lang.String aliasName)
Returns a String that can be used to in a SQL statement that involves a SELECT inside a FROM, to alias this inner view definition. |
java.lang.String |
getAttributeForColumnNames()
Returns the name of the column that contains the column names. |
java.lang.String |
getAttributeForColumnTypes()
Returns the name of the column that contains the column types. |
DbCore |
getBusinessDbCore()
|
short |
getBusinessDbms()
|
java.lang.String |
getBusinessSchemaName()
Returns the name of the business data schema. |
Print |
getCasePrintObject()
|
Columnset |
getColumnsetFromCase(java.lang.String nameOfCs,
Case theCase)
Returns a Columnset that is attached to one of the concepts of the given case and has the given name. |
java.lang.String |
getColumnTestQuery(Column col)
Returns a string that can be used as a query. |
M4InterfaceContext |
getCompilerAccessLogic()
|
java.util.Collection |
getCrossTablesReferringTo(java.lang.String dbObjectName)
Returns a collection of strings with all the names of DB tables/views that refer to the given table/view and seem to be a cross table. |
java.lang.String |
getDateComparisonAsSqlString(boolean useBusinessDBMS,
java.lang.String dateOrTimeColumnName,
java.lang.String dateExpression,
boolean greater,
boolean orEqual,
java.lang.String timeFormat)
Returns an SQL string that can be used in a query. |
java.lang.String |
getDbNameOfM4Datatype(java.lang.String m4RelDatatypeName,
int length,
boolean useBusinessDBMS)
This method returns the DBMS-dependent name of the datatype which the current DBMS uses to realize the given M4-Relational Datatype. |
static java.util.HashSet |
getDirtyObjectsForTable(java.lang.String dbTableName)
|
java.lang.String |
getFloorExpression()
Returns a String that can be used in a SQL statement and that computes the floor of some expression. |
void |
getFreshM4Connection()
Closes and re-opens the connection to the M4 database. |
java.lang.String |
getJdbcDriverClassName(boolean useBusinessDBMS)
Returns the Java class name of the JDBC driver used to access the database. |
short |
getM4Dbms()
|
java.lang.String |
getM4InstallationDirectory(boolean useBusinessDBMS)
Returns the Java class name of the JDBC driver used to access the database. |
M4Object |
getM4Object(long Id,
java.lang.Class m4ClassObject)
This method tries to find an object with the given Id in the Cache. |
M4Object |
getM4ObjectFromCache(long Id)
This method returns the object with the given Id if it is in the Cache. |
java.lang.String |
getM4RelationalDatatypeName(java.lang.String dbTypeName,
boolean useBusinessDBMS)
This method returns the M4-Relational Datatype that corresponds to the given DBMS-dependent name of a datatype. |
java.lang.String |
getM4RelTypeForConceptualType(java.lang.String conceptualType)
Returns the most suitable relational datatype for the given conceptual data type. |
java.util.Map |
getMapOfForeignKeyReferences(Columnset cs,
Case currentCase)
Returns a Map that maps every column of the given Columnset to a Columnset whose primary key it references, or to null if no such Columnset exists. |
java.lang.String |
getNameOfDateDatatype()
|
java.lang.String |
getNameOfNumericDatatype()
|
java.lang.String |
getNameOfVarcharDatatype(int size)
|
java.util.Collection |
getNamesOfBusSchemaDbObjects(boolean includeMmTables)
Returns the names of all Views and Tables in the business data schema that have not been created by the compiler for the current Case. |
java.util.Collection |
getNamesOfDbObjectsInTrash()
Returns the names of all Views and Tables (in the business schema) that have been created by the compiler for the current Case. |
long |
getNextM4SequenceValue()
|
long |
getNumberOfMonthsBetween(java.lang.String dbObjectName,
java.lang.String firstValue,
java.lang.String secondValue)
|
static java.util.Collection |
getObjectsToBeDeletedForTable(java.lang.String dbTableName)
|
java.lang.String |
getPowerExpression(java.lang.String base,
java.lang.String exponent)
Returns a String that can be used in a SQL statement and that computes the power of the base to the exponent. |
java.util.Collection |
getPrimaryKeysFromDbSchema(Columnset cs)
Returns all Columns of the given Columnset that form the primary key of that Columnset according to the SQL constraints in the DB. |
java.lang.String |
getRoundToDecimalPlacesExpression()
Returns a String that can be used in a SQL statement and that rounds some expression to n decimal places. |
java.lang.String |
getSelectStringAllBusDataTables()
Returns the SQL String that selects all table names from the business data schema. |
java.lang.String |
getSelectStringAllBusDataViews()
Returns the SQL String that selects all view names from the business data schema. |
java.lang.String |
getSelectStringAllColumnsForDbObject(java.lang.String dbObjectName)
Returns the SQL String that selects all column names for the given Table or View name from the business data schema. |
java.lang.String |
getSelectStringDistribValuesTimeColumn(java.lang.String colSql,
java.lang.String tableName,
java.lang.String distribBase)
Returns the SQL string that selects distribution values from the given column (given by its name and the name of its table or view). |
java.lang.String |
getUniqueRowIdentifier(boolean useBusinessDBMS)
Return the DBMS-dependent string which can be used in a SELECT-Statement in SQL to uniquely identify table rows by an integer. |
boolean |
isBusinessTable(java.lang.String dbObjectName)
|
boolean |
isBusinessView(java.lang.String dbObjectName)
|
boolean |
isCrossTable(java.lang.String dbObjectName)
|
boolean |
isForeignKeyColumn(Column theColumn)
Returns true iff the given column is declared to refer as a foreign key to a different DB table in the business database. |
boolean |
isM4Table(java.lang.String dbObjectName)
|
boolean |
isM4View(java.lang.String dbObjectName)
|
boolean |
isPrimaryKeyColumn(Column theColumn)
Returns true iff the given column is declared to act as a primary key of its DB table in the business database. |
void |
putM4ObjectToCache(M4Object m4o)
This method stores an M4 object in the Cache, using its ID as the key for the underlying data structure. |
static java.lang.String |
quote(java.lang.String sql)
Put "'" around the string and replace all "'" occuring inside by "''". |
void |
removeM4ObjectFromCache(M4Object m4o)
This method should only be called from the generic delete method in M4Data. |
void |
rollbackOnM4()
Roll back the last transactions (since the last commit) in the M4 database. |
boolean |
tableExistsInBusinessSchema(java.lang.String tableName)
|
boolean |
tableExistsInM4(java.lang.String tableName)
|
void |
updateDatabase()
This is the main method for writing updates back to the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final transient DbCore m4Dbc
protected final transient DbCore busiDbc
public static final short NO_DBMS
public static final short ORACLE
public static final short POSTGRES
public static final short MYSQL
public static final java.lang.String c_yes
public static final java.lang.String c_no
public static final java.lang.String c_output
public static final java.lang.String c_input
public static final java.lang.String c_db
public static final java.lang.String c_mining
public static java.lang.String C_VAL
public static java.lang.String C_CONC
public static java.lang.String C_REL
public static java.lang.String C_BA
public static java.lang.String C_MCF
public static java.lang.String C_FEA
protected boolean computeAllStat
protected transient M4InterfaceContext cal
public static final boolean READ_ONLY
public static final java.lang.String[] ORDER_FOR_WRITING
public static final java.util.HashMap dirtyObjectSets
HashSets of
dirty M4Data objects residing in these tables.
This data structure should only be manipulated directly by the
methods getDirtyObjectsForTable(String) and
clearDirtyObjectSets()!
| Constructor Detail |
|---|
public DB(java.lang.String m4Url,
java.lang.String m4DbName,
java.lang.String m4User,
java.lang.String m4Passwd,
java.lang.String dataUrl,
java.lang.String dataDbName,
java.lang.String dataUser,
java.lang.String dataPasswd,
boolean computeStatistics,
M4InterfaceContext cal)
throws java.sql.SQLException
null, the two connections are the same.
m4Url - Prefix of the M4 database urlm4DbName - name of the M4 databasem4User - name of the M4 database userm4Passwd - password for the M4 database userdataUrl - Prefix of the business database urldataDbName - name of the business databasedataUser - name of the business database userdataPasswd - password for the business database usercomputeStatistics - If FALSE, never compute statistics for a column;
if TRUE, do it always. (deprecated)cal - the CompilerAccessLogic object of the Thread.
java.sql.SQLException
public DB(ConfigReader cr,
boolean computeStatistics,
M4InterfaceContext cal)
throws java.sql.SQLException
ConfigReader object.
cr - A ConfigReader object to get the data connection information from.computeStatistics - If FALSE, never compute statistics for a column;
if TRUE, do it always. (deprecated)cal - the CompilerAccessLogic object of the Thread.
java.sql.SQLException
public DB(DB db,
M4InterfaceContext m4i)
db - an existing DB connection to copy the
connection data from and to share the cache with.m4i - the M4InterfaceContext to use| Method Detail |
|---|
public Print getCasePrintObject()
public void getFreshM4Connection()
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public short getM4Dbms()
throws DbConnectionClosed
DbConnectionClosed
public short getBusinessDbms()
throws DbConnectionClosed
DbConnectionClosedpublic java.lang.String getBusinessSchemaName()
public void commitM4Transactions()
throws M4Exception
M4Exception
public void commitBusinessTransactions()
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public void rollbackOnM4()
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public M4Object getM4Object(long Id,
java.lang.Class m4ClassObject)
throws M4Exception
Id - The unique M4 Id of the object to be looked up.m4ClassObject - This class will be instiated and filled if no object with
the given Id is in the Cache. The class specified has to be a subclass
of M4Object!
M4Exceptionpublic void clearM4Cache()
public M4Object getM4ObjectFromCache(long Id)
Id - The unique M4 Id of the object to be loaded.
null otherwise.
public void putM4ObjectToCache(M4Object m4o)
throws M4Exception
An - M4Object to be stored in the Cache.
M4Exception - if the object is null or
has an ID of 0.public void removeM4ObjectFromCache(M4Object m4o)
M4Data.
m4o - the M4Object to remove from the cache
because it has been deleted on M4 intervace level.
public static java.lang.String attribPrefix(java.lang.String attributeName,
java.lang.String prefix)
attributeName - Name of the attributeprefix - The prefix String
public static java.lang.String quote(java.lang.String sql)
sql - The String to be quoted
public java.lang.String getSelectStringDistribValuesTimeColumn(java.lang.String colSql,
java.lang.String tableName,
java.lang.String distribBase)
colSql - string that determines the column in the given table or viewtableName - name of a table or viewdistribBase - granularity of values to be returned by the query
public boolean areSomeStatisticsStored(Columnset cs)
throws M4Exception
cs - the columnset
M4Exception
public static java.lang.String checkDouble(java.lang.String test)
throws M4Exception
M4Exceptionpublic java.lang.String getSelectStringAllBusDataTables()
public java.lang.String getSelectStringAllBusDataViews()
public java.lang.String getSelectStringAllColumnsForDbObject(java.lang.String dbObjectName)
dbObjectName - Name of a table or view in the business data schema
public java.lang.String getAttributeForColumnNames()
public java.lang.String getNameOfNumericDatatype()
public java.lang.String getNameOfVarcharDatatype(int size)
public java.lang.String getNameOfDateDatatype()
public java.lang.String getDbNameOfM4Datatype(java.lang.String m4RelDatatypeName,
int length,
boolean useBusinessDBMS)
throws M4CompilerError
m4RelDatatypeName - name of the M4 Relational Datatypelength - Gives a size for the datatype. For example, if the M4 Relational Datatype
is NUMBER and length is 10, then the return value will be the String "NUMBER(10)"
if the DBMS is Oracle. If this length is not positive, the datatype will be returned without
a size, in the example: "NUMBER" The DBMS may not allow lengths at all, in which case
also the datatype without a size is returned.useBusinessDBMS - Set this parameter to TRUE if the datatype should be looked up
in the DB that holds the business data schema. Set it to FALSE if it should
be looked up in the M4 schema DB.
M4CompilerError
public java.lang.String getUniqueRowIdentifier(boolean useBusinessDBMS)
throws M4CompilerError
useBusinessDBMS - Set this parameter to TRUE if the unique row identifier will be used
in the business data schema. (This is probably the case.) Set it to FALSE if the
identifier will be used in the M4 data schema.
M4CompilerError
public java.lang.String getJdbcDriverClassName(boolean useBusinessDBMS)
throws M4CompilerError
useBusinessDBMS - Set this to TRUE if the JDBC driver for accessing
the business data is meant; if FALSE, the driver for the M4 database is used
M4CompilerError
public java.lang.String getM4InstallationDirectory(boolean useBusinessDBMS)
throws M4Exception
useBusinessDBMS - Set this to TRUE if the JDBC driver for accessing
the business data is meant; if FALSE, the driver for the M4 database is used
M4CompilerError
M4Exception
public java.lang.String getDateComparisonAsSqlString(boolean useBusinessDBMS,
java.lang.String dateOrTimeColumnName,
java.lang.String dateExpression,
boolean greater,
boolean orEqual,
java.lang.String timeFormat)
throws M4CompilerError
useBusinessDBMS - set it to TRUE if the business DBMS should determine
the format of the returned String; set it to FALSE if the M4 DBMS should be useddateOrTimeColumnName - one date expression (MUST be a column name)dateExpression - another date expression (can NOT be a column name)greater - If TRUE, firstDate > secondDate is asked for in the returned
query; if FALSE, firstDate < secondDate is asked fororEqual - if TRUE, >= or <= are used for
comparison instead of < or > timeFormat - a time format to be used for comparison
M4CompilerError
public java.lang.String getColumnTestQuery(Column col)
throws DbConnectionClosed
DbConnectionClosedpublic java.lang.String getAttributeForColumnTypes()
public java.util.Collection getNamesOfBusSchemaDbObjects(boolean includeMmTables)
throws M4Exception
M4Exception
public java.util.Collection getNamesOfDbObjectsInTrash()
throws M4Exception
M4Exception
public java.util.Collection getPrimaryKeysFromDbSchema(Columnset cs)
throws M4Exception
cs - the given Columnset
M4Exception
public java.util.Map getMapOfForeignKeyReferences(Columnset cs,
Case currentCase)
throws M4Exception
cs - the given ColumnsetcurrentCase - the Case to which the given Columnset belongs/should belong
M4Exception
public Columnset createColumnsetFromTable(java.lang.String tableName)
throws M4Exception
M4Exception
public Columnset getColumnsetFromCase(java.lang.String nameOfCs,
Case theCase)
throws M4Exception
nameOfCs - theCase -
M4Exception
public boolean isCrossTable(java.lang.String dbObjectName)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public java.util.Collection getCrossTablesReferringTo(java.lang.String dbObjectName)
throws java.sql.SQLException,
DbConnectionClosed
dbObjectName -
java.sql.SQLException
DbConnectionClosed
public boolean dropBusinessTable(java.lang.String tableName)
throws M4Exception
tableName - the name of the table to be dropped
M4Exception
public boolean dropM4Table(java.lang.String tableName)
throws M4Exception
tableName - the name of the table to be dropped
M4Exception
public boolean isBusinessTable(java.lang.String dbObjectName)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public boolean isBusinessView(java.lang.String dbObjectName)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public boolean isM4Table(java.lang.String dbObjectName)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public boolean isM4View(java.lang.String dbObjectName)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosed
public boolean tableExistsInM4(java.lang.String tableName)
throws M4Exception
M4Exception
public boolean tableExistsInBusinessSchema(java.lang.String tableName)
throws M4Exception
M4Exception
public java.lang.String getPowerExpression(java.lang.String base,
java.lang.String exponent)
throws M4Exception
base - exponent -
M4Exception
public java.lang.String getFloorExpression()
throws M4Exception
M4Exception
public java.lang.String getRoundToDecimalPlacesExpression()
throws M4Exception
M4Exception
public long getNumberOfMonthsBetween(java.lang.String dbObjectName,
java.lang.String firstValue,
java.lang.String secondValue)
throws M4Exception
M4Exception
public java.lang.String getAliasExpressionForInnerSelects(java.lang.String aliasName)
throws M4Exception
aliasName -
M4Exception
public void createReverseStepTable()
throws M4Exception
M4Exception
public void executeM4SqlWrite(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
query - an SQL query to be executed. This has to be a write operation to the M4 database,
or an SQL string to execute a procedure in the M4 schema.
java.sql.SQLException
DbConnectionClosed
public void executeBusinessSqlWrite(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
query - an SQL query to be executed. This has to be a write operation to the business database,
or an SQL string to execute a procedure in the business schema.
java.sql.SQLException
DbConnectionClosed
public java.sql.ResultSet executeM4SqlRead(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
ResultSet after usage!
query - an SQL query to be executed. This has to be a read operation on the M4 database.
ResultSet
java.sql.SQLException
DbConnectionClosed
public java.sql.ResultSet executeBusinessSqlRead(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
ResultSet after usage!
query - an SQL query to be executed. This has to be a read operation on the business database.
ResultSet
java.sql.SQLException
DbConnectionClosed
public java.lang.Long executeM4SingleValueSqlReadL(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosedIn contrast to that method, this method creates and then closes its own
Statement.
public java.lang.Long executeBusinessSingleValueSqlReadL(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosedIn contrast to that method, this method creates and then closes its own
Statement.
public java.lang.String executeM4SingleValueSqlRead(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosedIn contrast to that method, this method creates and then closes its own
Statement.
public java.lang.String executeBusinessSingleValueSqlRead(java.lang.String query)
throws java.sql.SQLException,
DbConnectionClosed
java.sql.SQLException
DbConnectionClosedIn contrast to that method, this method creates and then closes its own
Statement.
public boolean isForeignKeyColumn(Column theColumn)
throws M4Exception
theColumn - the column for which to decide if it contains a foreign key
M4Exception
public boolean isPrimaryKeyColumn(Column theColumn)
throws M4Exception
theColumn - the column for which to decide if it contains a primary key
M4Exception
public java.lang.String getM4RelationalDatatypeName(java.lang.String dbTypeName,
boolean useBusinessDBMS)
throws M4Exception
dbTypeName - name of the DBMS-dependent datatypeuseBusinessDBMS - Set this parameter to TRUE if the datatype should be looked up
in the DB that holds the business data schema. Set it to FALSE if it should
be looked up in the M4 schema DB.
M4Exceptionpublic java.lang.String getM4RelTypeForConceptualType(java.lang.String conceptualType)
conceptualType -
public long getNextM4SequenceValue()
throws DbConnectionClosed,
M4Exception
M4Exception - if for some reason the sequence does not return a value
DbConnectionClosed
protected void doPrint(java.util.logging.Level verbosity,
java.lang.String message)
protected void doPrint(java.lang.Exception ex)
public M4InterfaceContext getCompilerAccessLogic()
public DbCore getBusinessDbCore()
throws DbConnectionClosed
DbConnectionClosed
public M4Object createNewInstance(java.lang.Class c)
throws M4Exception
a - Class object, subclass of M4Object.
M4Exception
public boolean createSQLView(Columnset cs)
throws M4Exception
Columnset - to be testedstep - the step in which this Columnset was created
M4Exceptionpublic static java.lang.String closeResultSet(java.sql.ResultSet rs)
ResultSets.
rs - a ResultSet to be closed or null to do nothing.
SQLException or null if no
error occured (or if rs was null).public static java.util.HashSet getDirtyObjectsForTable(java.lang.String dbTableName)
HashSet of dirty objects for the
given M4 database table name. Should only be used by the
methods for setting objects dirty and clean!
public static java.util.Collection getObjectsToBeDeletedForTable(java.lang.String dbTableName)
throws M4Exception
M4Exception
public void updateDatabase()
throws M4Exception
storeLocal().
M4Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||