Examples of JcrType


Examples of org.modeshape.jdbc.JcrType

        if (objIdx == null) return;

        if (source instanceof JcrResultSet) {
            Value v = ((JcrResultSet)source).getValue(col);
            JcrType jcrType = JcrType.typeInfo(v.getType());
            assertThat(objIdx, IsInstanceOf.instanceOf(jcrType.getRepresentationClass()));
        }
    }
View Full Code Here

Examples of org.modeshape.jdbc.JcrType

            /**
             * performing specific checks to make sure these are defined as expected.
             */
            if (colName.equalsIgnoreCase("jcr:score")) {
                JcrType jcrType = JcrType.typeInfo(JcrType.DefaultDataTypes.DOUBLE);
                assertThat(colTypeName, is(jcrType.getJcrName()));
            } else if (colName.equalsIgnoreCase("mode:depth")) {
                JcrType jcrType = JcrType.typeInfo(JcrType.DefaultDataTypes.LONG);
                assertThat(colTypeName, is(jcrType.getJcrName()));
            } else if (colName.equalsIgnoreCase("mode:id")) {
                JcrType jcrType = JcrType.typeInfo(JcrType.DefaultDataTypes.STRING);
                assertThat(colTypeName, is(jcrType.getJcrName()));
            }

            sb.append(colName).append("[") //$NON-NLS-1$
              .append(colTypeName).append("]"); //$NON-NLS-1$
            if (col != columnCount) {
View Full Code Here

Examples of org.modeshape.jdbc.JcrType

        /*******************************************************
         * HardCoding Column metadata details for the given column
         ********************************************************/

        JcrType type = JcrType.typeInfo(dataType);
        if (type == null) {
            throw new RuntimeException("Program error: jcr type " + dataType + " not found");
        }

        metadataMap.put(ResultsMetadataConstants.CATALOG, catalogName);
        metadataMap.put(ResultsMetadataConstants.TABLE, tableName);
        metadataMap.put(ResultsMetadataConstants.COLUMN, columnName);
        metadataMap.put(ResultsMetadataConstants.DATA_TYPE, dataType);
        metadataMap.put(ResultsMetadataConstants.PRECISION, type.getDefaultPrecision());
        metadataMap.put(ResultsMetadataConstants.RADIX, new Integer(10));
        metadataMap.put(ResultsMetadataConstants.SCALE, new Integer(0));
        metadataMap.put(ResultsMetadataConstants.AUTO_INCREMENTING, Boolean.FALSE);
        metadataMap.put(ResultsMetadataConstants.CASE_SENSITIVE, caseSensitive);
        metadataMap.put(ResultsMetadataConstants.NULLABLE, nullable);
        metadataMap.put(ResultsMetadataConstants.SEARCHABLE, searchable);
        metadataMap.put(ResultsMetadataConstants.SIGNED, signed);
        metadataMap.put(ResultsMetadataConstants.WRITABLE, writable);
        metadataMap.put(ResultsMetadataConstants.CURRENCY, Boolean.FALSE);
        metadataMap.put(ResultsMetadataConstants.DISPLAY_SIZE, type.getNominalDisplaySize());

        return metadataMap;
    }
View Full Code Here

Examples of org.modeshape.jdbc.JcrType

    @Override
    public int getColumnType( int index ) {
        String runtimeTypeName = provider.getStringValue(adjustColumn(index), ResultsMetadataConstants.DATA_TYPE);

        JcrType typeInfo = JcrType.typeInfo(runtimeTypeName);
        return typeInfo != null ? typeInfo.getJdbcType() : Types.VARCHAR;
    }
View Full Code Here

Examples of org.modeshape.jdbc.JcrType

        return provider.getBooleanValue(adjustColumn(index), ResultsMetadataConstants.WRITABLE);
    }

    @Override
    public String getColumnClassName( int index ) {
        JcrType typeInfo = JcrType.typeInfo(getColumnTypeName(index));
        return typeInfo != null ? typeInfo.getRepresentationClass().getName() : String.class.getName();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.