net.sourceforge.squirrel_sql.plugins.oracle.types
Class OracleXmlTypeDataTypeComponent
java.lang.Object
net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BaseDataTypeComponent
net.sourceforge.squirrel_sql.plugins.oracle.types.OracleXmlTypeDataTypeComponent
- All Implemented Interfaces:
- IDataTypeComponent
public class OracleXmlTypeDataTypeComponent
- extends BaseDataTypeComponent
- implements IDataTypeComponent
A custom DatatType implementation of IDataTypeComponent that can handle Oracle's SYS.XMLTYPE (DataType
value of 2007). This requires that the XDK (XML Developer Kit) be downloaded from Oracle and the jars from
this kit included along with the driver in "Extra ClassPath".
- Author:
- manningr
| Methods inherited from class net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BaseDataTypeComponent |
areEqual, exportObject, getJTextArea, getJTextField, getKeyListener, importObject, renderObject, setBeepHelper, setColumnDisplayDefinition, setTable, validateAndConvert, validateAndConvertInPopup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IDataTypeComponent |
areEqual, exportObject, getJTextArea, getJTextField, importObject, renderObject, setBeepHelper, setColumnDisplayDefinition, setTable, validateAndConvert, validateAndConvertInPopup |
OracleXmlTypeDataTypeComponent
public OracleXmlTypeDataTypeComponent()
canDoFileIO
public boolean canDoFileIO()
- Specified by:
canDoFileIO in interface IDataTypeComponent
getClassName
public String getClassName()
- Specified by:
getClassName in interface IDataTypeComponent- Overrides:
getClassName in class BaseDataTypeComponent
- See Also:
IDataTypeComponent.getClassName()
getDefaultValue
public Object getDefaultValue(String dbDefaultValue)
- Specified by:
getDefaultValue in interface IDataTypeComponent
- See Also:
IDataTypeComponent.getDefaultValue(java.lang.String)
getWhereClauseValue
public String getWhereClauseValue(Object value,
ISQLDatabaseMetaData md)
- Specified by:
getWhereClauseValue in interface IDataTypeComponent- Overrides:
getWhereClauseValue in class BaseDataTypeComponent
- See Also:
IDataTypeComponent.getWhereClauseValue(java.lang.Object,
net.sourceforge.squirrel_sql.fw.sql.ISQLDatabaseMetaData)
isEditableInCell
public boolean isEditableInCell(Object originalValue)
- This Data Type can be edited in a table cell as long as there are no issues using the XDK to display the
data. If we should encounter Exceptions using XDK, then we should prevent the user from editing the cell
(our error message is not meant to be valid XML data; further, we don't want to let the user whack their
data with our tool accidentally)
- Specified by:
isEditableInCell in interface IDataTypeComponent
- See Also:
IDataTypeComponent.isEditableInCell(java.lang.Object)
isEditableInPopup
public boolean isEditableInPopup(Object originalValue)
- This Data Type can be edited in a popup as long as there are no issues using the XDK to display the
data. If we should encounter Exceptions using XDK, then we should prevent the user from editing the cell
(our error message is not meant to be valid XML data; further, we don't want to let the user whack their
data with our tool accidentally)
- Specified by:
isEditableInPopup in interface IDataTypeComponent
- See Also:
IDataTypeComponent.isEditableInPopup(java.lang.Object)
needToReRead
public boolean needToReRead(Object originalValue)
- Specified by:
needToReRead in interface IDataTypeComponent
- See Also:
IDataTypeComponent.needToReRead(java.lang.Object)
readResultSet
public Object readResultSet(ResultSet rs,
int idx,
boolean limitDataRead)
throws SQLException
- This class relies on reflection to get a handle to Oracle's XMLType which is made available separately
from the JDBC driver, so we cannot just assume the user will always have, nor can we depend on it to
compile SQuirreL code. So we remove this dependency here by using reflection which doesn't require this
library in order to just compile the code.
- Specified by:
readResultSet in interface IDataTypeComponent
- Throws:
SQLException- See Also:
IDataTypeComponent.readResultSet(java.sql.ResultSet,
int, boolean)
setPreparedStatementValue
public void setPreparedStatementValue(PreparedStatement pstmt,
Object value,
int position)
throws SQLException
- Specified by:
setPreparedStatementValue in interface IDataTypeComponent
- Throws:
SQLException- See Also:
IDataTypeComponent.setPreparedStatementValue(java.sql.PreparedStatement,
java.lang.Object, int)
useBinaryEditingPanel
public boolean useBinaryEditingPanel()
- Specified by:
useBinaryEditingPanel in interface IDataTypeComponent
- See Also:
IDataTypeComponent.useBinaryEditingPanel()
Copyright © 2001-2010. All Rights Reserved.