|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.edg.info.InstanceBase
org.edg.info.SchemaInstance
SchemaInstance is an object that supports the SchemaServlet. It a offers package-level methods that correspond to Schema API methods. XXX-AC: note, this doesn't actually inherit much, if anything from InstanceBase. XXX-AC: registry and schema instances can be refactored to inherit from some super class with: close(), closeStatement(), dbConnection, servletLocation, get/setServletLocation(), convertResultSet()
Field Summary |
Fields inherited from class org.edg.info.InstanceBase |
DEFAULT_TERMINATION_INTERVAL_MS, s_maxTerminationInterval, s_minTerminationInterval |
Constructor Summary | |
SchemaInstance(org.glite.rgma.services.config.SchemaConfig schemaConfig)
Creates a new SchemaInstance object. |
Method Summary | |
void |
createTable(java.lang.String createStatement)
Creates a new Producer table definition in the Schema. |
void |
destroy()
Closes the database connection. |
void |
dropTable(java.lang.String tableName)
Removes table 'tableName' from the Schema Synchronized to avoid interference between drop and create Table |
org.glite.rgma.system.ResultSet |
getAllSchemaTables()
returns all the |
org.glite.rgma.system.ResultSet |
getColumnNames(java.lang.String[] columnIds)
Method retrieves all column names for each column ID. |
java.lang.String |
getColumnType(int columnId)
returns the type of a column that has columnId |
java.lang.String[] |
getColumnTypes(java.lang.String tableName,
java.lang.String[] columnNames)
returns the types that correspond to a particular table's columns. |
org.glite.rgma.system.ResultSet |
getPrimaryKey(java.lang.String tableName)
|
java.lang.String |
getTableDesc(java.lang.String tableName)
Returns a CREATE TABLE statement for the given table. |
org.glite.rgma.system.ResultSet |
getTableInfo(int tableId)
returns the names of columns of the table with tableId. |
java.lang.String |
getVDBName()
|
void |
setServletLocation(java.lang.String schemaServletLocation)
sets the location of this instance's servlet. |
int |
translateColumnName(int tableId,
java.lang.String columnName)
returns the columnId for a particular table's columnName. |
int |
translateTableName(java.lang.String tableName)
returns the tableId that corresponds to a tableName |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SchemaInstance(org.glite.rgma.services.config.SchemaConfig schemaConfig) throws org.glite.rgma.system.RGMAException
org.glite.rgma.system.RGMAException
- DOCUMENT ME!Method Detail |
public org.glite.rgma.system.ResultSet getAllSchemaTables() throws org.glite.rgma.system.RGMAException
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public org.glite.rgma.system.ResultSet getColumnNames(java.lang.String[] columnIds) throws org.glite.rgma.system.RGMAException
columnIds
- DOCUMENT ME!
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public java.lang.String getColumnType(int columnId) throws org.glite.rgma.system.RGMAException
columnId
- DOCUMENT ME!
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public java.lang.String[] getColumnTypes(java.lang.String tableName, java.lang.String[] columnNames) throws org.glite.rgma.system.RGMAException
tableName
- DOCUMENT ME!columnNames
- DOCUMENT ME!
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public org.glite.rgma.system.ResultSet getPrimaryKey(java.lang.String tableName) throws org.glite.rgma.system.RGMAException
org.glite.rgma.system.RGMAException
public java.lang.String getTableDesc(java.lang.String tableName) throws org.glite.rgma.system.RGMAException
tableName
- DOCUMENT ME!
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public org.glite.rgma.system.ResultSet getTableInfo(int tableId) throws org.glite.rgma.system.RGMAException
tableId
- DOCUMENT ME!
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public void createTable(java.lang.String createStatement) throws org.glite.rgma.system.RGMAException
createStatement
- the CREATE TABLE statement.
org.glite.rgma.system.RGMAException
- if incorrect columns are defined as NOT NULL. If
unable to find a column defined as a PRIMARY KEY. Or if unable
to parse CREATE TABLE statement.public int translateColumnName(int tableId, java.lang.String columnName) throws org.glite.rgma.system.RGMAException
tableId
- DOCUMENT ME!columnName
- DOCUMENT ME!
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public int translateTableName(java.lang.String tableName) throws org.glite.rgma.system.RGMAException
tableName
- DOCUMENT ME!
org.glite.rgma.system.RGMAException
- DOCUMENT ME!public void setServletLocation(java.lang.String schemaServletLocation)
schemaServletLocation
- DOCUMENT ME!public void destroy()
public void dropTable(java.lang.String tableName) throws org.glite.rgma.system.RGMAException
tableName
-
org.glite.rgma.system.RGMAException
- Thrown if the database could not be contacted.public java.lang.String getVDBName()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |