net.sourceforge.squirrel_sql.plugins.postgres.types
Class PostgreSqlOtherTypeDataTypeComponent
java.lang.Object
net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BaseDataTypeComponent
net.sourceforge.squirrel_sql.plugins.postgres.types.PostgreSqlOtherTypeDataTypeComponent
- All Implemented Interfaces:
- IDataTypeComponent
public class PostgreSqlOtherTypeDataTypeComponent
- extends BaseDataTypeComponent
- implements IDataTypeComponent
A custom DatatType implementation of IDataTypeComponent that can handle Postgres' many "other" types (
DataType value of 1111).
- Author:
- manningr
| Methods inherited from class net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BaseDataTypeComponent |
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 |
PostgreSqlOtherTypeDataTypeComponent
public PostgreSqlOtherTypeDataTypeComponent(String typeName)
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 displaying the data. If we
detect our error message in the cell, 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 displaying the data. If we
detect our error message in the cell, 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()
areEqual
public boolean areEqual(Object obj1,
Object obj2)
- Specified by:
areEqual in interface IDataTypeComponent- Overrides:
areEqual in class BaseDataTypeComponent
- See Also:
IDataTypeComponent.areEqual(java.lang.Object,
java.lang.Object)
Copyright © 2001-2010. All Rights Reserved.