public String getSQLType() { return getInternal().getSqlType(); }
public boolean isUnlimitedLength() { // TODO Enable the two commented out lines so that we can allow people to have "BLOB(1024)" etc if (columnMetaData.getJdbcType() != null && (columnMetaData.getJdbcType() == JdbcType.BLOB || columnMetaData.getJdbcType() == JdbcType.CLOB)/* && !typeInfo.isAllowsPrecisionSpec()*/) { // Allow for jdbc-type=BLOB/CLOB return true; } else if (columnMetaData.getSqlType() != null && columnMetaData.getSqlType().toLowerCase().indexOf("lob") > 0/* && !typeInfo.isAllowsPrecisionSpec()*/) { // Allow for sql-type=BLOB/CLOB return true; } return false; }
public SQLTypeInfo getTypeInfo() { if (column != null && column.getColumnMetaData().getSqlType() != null) { return storeMgr.getSQLTypeInfoForJDBCType(Types.TINYINT, column.getColumnMetaData().getSqlType()); } return storeMgr.getSQLTypeInfoForJDBCType(Types.TINYINT); }
return FieldType.Picklist; String type = md.getJdbcType() != null ? md.getJdbcType() : md.getSqlType(); if (type == null) { return null;
return FieldType.Picklist; String type = md.getJdbcType() != null ? md.getJdbcType() : md.getSqlType(); if (type == null) { return null;
if (colmd.getSqlType() != null) str.append(" sql-type=\"" + colmd.getSqlType() + "\"");
/** * Accessor for the (SQL) type info for this datastore type. * Finds the SQLTypeInfo using the JDBC Type for this mapping. Override if you want a different method. * @return The type info */ public SQLTypeInfo getTypeInfo() { if (column != null) { if (column.getColumnMetaData().getSqlType() != null) { return storeMgr.getSQLTypeInfoForJDBCType(getJDBCType(), column.getColumnMetaData().getSqlType()); } if (storeMgr.getBooleanProperty(RDBMSPropertyNames.PROPERTY_RDBMS_DEFAULT_SQL_TYPE)) { // This caters for when the JDBC driver has multiple sql-type for this jdbc-type, so we pick the default one specified in plugin.xml String sqlTypeDflt = getDatastoreAdapter().getDefaultSqlTypeForJavaType(getJavaTypeMapping().getJavaType().getName(), getDatastoreAdapter().getNameForJDBCType(getJDBCType())); if (sqlTypeDflt != null) { return storeMgr.getSQLTypeInfoForJDBCType(getJDBCType(), sqlTypeDflt); } } } return storeMgr.getSQLTypeInfoForJDBCType(getJDBCType()); }
@Override public void setObject(ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value) { if (exprIndex == null) { return; } if (converter == null) { super.setObject(ec, ps, exprIndex, value); } else { if (datastoreMappings.length > 0) { ColumnMetaData colmd = datastoreMappings[0].getColumn().getColumnMetaData(); if (colmd.getSqlType() != null) { super.setObject(ec, ps, exprIndex, value); return; } } getDatastoreMapping(0).setObject(ps, exprIndex[0], converter.toDatastoreType(value)); } }
@Override public Object getObject(ExecutionContext ec, ResultSet resultSet, int[] exprIndex) { if (exprIndex == null) { return null; } if (converter == null) { return super.getObject(ec, resultSet, exprIndex); } if (datastoreMappings.length > 0) { ColumnMetaData colmd = datastoreMappings[0].getColumn().getColumnMetaData(); if (colmd.getSqlType() != null) { return super.getObject(ec, resultSet, exprIndex); } } Object datastoreValue = getDatastoreMapping(0).getObject(resultSet, exprIndex[0]); return (datastoreValue != null ? converter.toMemberType(datastoreValue) : null); } }
if (this.columnMetaData.getSqlType() != null) col.columnMetaData.setSqlType(this.columnMetaData.getSqlType());
/** * Method to create the datastore mapping for a particular column and java type. * If the column is specified it is linked to the created datastore mapping. * @param mapping The java mapping * @param column The column (can be null) * @param javaType The java type * @return The datastore mapping */ public DatastoreMapping createDatastoreMapping(JavaTypeMapping mapping, Column column, String javaType) { Column col = column; String jdbcType = null; String sqlType = null; if (col != null && col.getColumnMetaData() != null) { // Utilise the jdbc and sql types if specified jdbcType = col.getColumnMetaData().getJdbcTypeName(); sqlType = col.getColumnMetaData().getSqlType(); } Class datastoreMappingClass = storeMgr.getDatastoreAdapter().getDatastoreMappingClass(javaType, jdbcType, sqlType, clr, null); DatastoreMapping datastoreMapping = DatastoreMappingFactory.createMapping(datastoreMappingClass, mapping, storeMgr, column); if (column != null) { column.setDatastoreMapping(datastoreMapping); } return datastoreMapping; }
if (colmd.getSqlType() != null) columnMetaData.setSqlType(colmd.getSqlType());
sqlType = colmds[index].getSqlType(); sqlType = colmds[index].getSqlType(); sqlType = colmds[index].getSqlType(); sqlType = mmd.getColumnMetaData()[index].getSqlType();
if (colmd.getSqlType() != null)