|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Storage interface for use with a database. This interface adds two type of methods. The first are methods used to configure the database, or to store the current configuration, either by using a Document or through seperate calls. The second methods are used as callback methods by a DatabaseTransaction object, to handle specific database dependent routines, such as storing binary objects.
| Field Summary | |
static int |
KEY_FOREIGN
Deprecated. Indicates a field is a foreign key |
static int |
KEY_NONE
Deprecated. Indicates a field is not a key, and nullable |
static int |
KEY_NOTNULL
Deprecated. Indicates a field is not a key, and not nullable |
static int |
KEY_PRIMARY
Deprecated. Indicates a field is a primary key |
static int |
KEY_SECONDARY
Deprecated. Indicates a field is a unique secondary key |
| Fields inherited from interface org.mmbase.storage.search.SearchQueryHandler |
FEATURE_MAX_NUMBER, FEATURE_OFFSET, SUPPORT_NONE, SUPPORT_NORMAL, SUPPORT_OPTIMAL, SUPPORT_WEAK |
| Method Summary | |
java.io.File |
getBinaryFilePath()
Deprecated. Returns the filepath where binary objects are stored. |
java.lang.String |
getCreateExtendedScheme()
Deprecated. Returns the scheme (SQL command) to use for creating a table that extends another table |
java.lang.String |
getCreateScheme()
Deprecated. Returns the scheme (SQL command) to use for creating a table |
java.util.Map |
getFieldNameMap()
Deprecated. Returns the current mapping of disallowed fieldsnames (typically reserved words) and their replacement names. |
java.lang.String |
getForeignKeyScheme()
Deprecated. Returns the scheme (SQL command) to use for creating a key |
JDBCInterface |
getJDBC()
Deprecated. Returns the JDBC module used by this class to connect to the database. |
java.lang.String |
getKeyScheme()
Deprecated. Returns the scheme (SQL command) to use for creating a key |
int |
getMaxDropSize()
Deprecated. Returns the maximum table drop size. |
java.lang.String |
getNotNullScheme()
Deprecated. Returns the scheme (SQL command) to use for creating a non-null field |
java.lang.String |
getPrimaryKeyScheme()
Deprecated. Returns the scheme (SQL command) to use for creating a primary key |
boolean |
getStoreBinaryAsFile()
Deprecated. Returns whether binary objects are stored as files (rather than in the database) |
java.util.Map |
getTypeMap()
Deprecated. Obtains the type map. |
void |
init(MMBase mmb,
XMLDatabaseReader reader)
Deprecated. Initializes the database layer. |
void |
loadFieldFromTable(MMObjectNode node,
java.lang.String fieldName,
java.sql.ResultSet rs,
int i)
Deprecated. Stores a field in a table ResultSet in a MMObjectNode. |
java.lang.String |
mapToMMBaseFieldName(java.lang.String fieldName)
Deprecated. Maps a database fieldname to a fieldname as used by the MMbase system |
java.lang.String |
mapToTableFieldName(java.lang.String fieldName)
Deprecated. Maps a MMBase fieldname to a fieldname acceptable to the database |
void |
registerChanged(MMObjectNode node,
java.lang.String change)
Deprecated. Registers the change to a node. |
void |
setBinaryFilePath(java.io.File path)
Deprecated. Sets the filepath where binary objects are stored. |
void |
setCreateExtendedScheme(java.lang.String scheme)
Deprecated. Sets the scheme (SQL command) to use for creating a table that extends another table |
void |
setCreateScheme(java.lang.String scheme)
Deprecated. Sets the scheme (SQL command) to use for creating a table |
void |
setFieldNameMap(java.util.Map fieldmap)
Deprecated. Sets the mapping of MMBase fieldnames (typically reserved words) to database fieldnames. |
void |
setForeignKeyScheme(java.lang.String scheme)
Deprecated. Sets the scheme (SQL command) to use for creating a key |
void |
setKeyScheme(java.lang.String scheme)
Deprecated. Sets the scheme (SQL command) to use for creating a key |
void |
setMaxDropSize(int value)
Deprecated. Sets the maximum table drop size. |
void |
setNotNullScheme(java.lang.String scheme)
Deprecated. Sets the scheme (SQL command) to use for creating a non-null field |
void |
setPrimaryKeyScheme(java.lang.String scheme)
Deprecated. Sets the scheme (SQL command) to use for creating a primary key |
void |
setStoreBinaryAsFile(boolean value)
Deprecated. Sets whether binary objects are stored as files (rather than in the database) |
void |
setTypeMap(java.util.Map typeMap)
Deprecated. Sets the type map. |
boolean |
setValuePreparedStatement(java.sql.PreparedStatement stmt,
MMObjectNode node,
java.lang.String key,
int i)
Deprecated. Set prepared statement field i with value of key from node |
boolean |
supportsExtendedTables()
Deprecated. Returns whether this storage layer supports extended tables. |
| Methods inherited from interface org.mmbase.storage.Storage |
addField, changeField, commit, commit, create, create, created, createKey, createKey, createObjectStorage, createObjectStorage, createTransaction, delete, delete, drop, getBytes, getNode, getNode, getNodeType, getNodeType, getText, insert, insert, isAllowedParentBuilder, registerParentBuilder, removeField, size, supportsRollback, updateStorage |
| Methods inherited from interface org.mmbase.storage.search.SearchQueryHandler |
getNodes, getSupportLevel, getSupportLevel |
| Field Detail |
public static final int KEY_NONE
public static final int KEY_PRIMARY
public static final int KEY_SECONDARY
public static final int KEY_FOREIGN
public static final int KEY_NOTNULL
| Method Detail |
public void init(MMBase mmb,
XMLDatabaseReader reader)
mmb - the MBase instance that uses this database layerreader - the database configuration readerpublic boolean getStoreBinaryAsFile()
public void setStoreBinaryAsFile(boolean value)
value - if true, binary objects will be stored as filespublic java.io.File getBinaryFilePath()
getStoreBinaryAsFile() returns true.
public void setBinaryFilePath(java.io.File path)
getStoreBinaryAsFile() returns true.
path - the file pathpublic void setFieldNameMap(java.util.Map fieldmap)
fieldmap - Map of field mappings. The map contins a key value pairs where the key is
the MMbase fieldname, and the value the replacement acceptable to the database.public java.util.Map getFieldNameMap()
setFieldNameMap(java.util.Map).
public void setTypeMap(java.util.Map typeMap)
public java.util.Map getTypeMap()
setTypeMap(java.util.Map).
However, the individual map elements are not copies - changing the dTypeInfo objects wil
affect the database layer directly.
public void setPrimaryKeyScheme(java.lang.String scheme)
scheme - the scheme to usepublic java.lang.String getPrimaryKeyScheme()
public void setNotNullScheme(java.lang.String scheme)
scheme - the scheme to usepublic java.lang.String getNotNullScheme()
public void setKeyScheme(java.lang.String scheme)
scheme - the scheme to usepublic java.lang.String getKeyScheme()
public void setForeignKeyScheme(java.lang.String scheme)
scheme - the scheme to usepublic java.lang.String getForeignKeyScheme()
public void setCreateScheme(java.lang.String scheme)
scheme - the scheme to usepublic java.lang.String getCreateScheme()
public void setCreateExtendedScheme(java.lang.String scheme)
scheme - the scheme to usepublic java.lang.String getCreateExtendedScheme()
public void setMaxDropSize(int value)
value - the maximum size to setpublic int getMaxDropSize()
public boolean supportsExtendedTables()
public java.lang.String mapToTableFieldName(java.lang.String fieldName)
public java.lang.String mapToMMBaseFieldName(java.lang.String fieldName)
public JDBCInterface getJDBC()
public void loadFieldFromTable(MMObjectNode node,
java.lang.String fieldName,
java.sql.ResultSet rs,
int i)
node - the node to store the field inrs - the ResultSet containing the table rowi - the index of the field in the ResultSet
public boolean setValuePreparedStatement(java.sql.PreparedStatement stmt,
MMObjectNode node,
java.lang.String key,
int i)
throws java.sql.SQLException
java.sql.SQLException - if an error occurred while filling in the fields
public void registerChanged(MMObjectNode node,
java.lang.String change)
node - the node to registerchange - the type of change: "n": new, "c": commit, "d": delete
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||