Examples of BasicType


Examples of com.asakusafw.dmdl.semantics.type.BasicType

                .toStatement();
        }

        private BasicTypeKind toBasicKind(Type type) {
            assert type instanceof BasicType;
            BasicType basicType = (BasicType) type;
            return basicType.getKind();
        }
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.type.BasicType

            title.setCellValue(property.getName().identifier);

            Cell value = valueRow.createCell(index);
            value.setCellStyle(info.dataStyle);
            if (property.getType() instanceof BasicType) {
                BasicType type = (BasicType) property.getType();
                switch (type.getKind()) {
                case DATE:
                    value.setCellStyle(info.dateDataStyle);
                    break;
                case DATETIME:
                    value.setCellStyle(info.datetimeDataStyle);
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.type.BasicType

    public static Class<?> getValueTypeAsClass(PropertyDeclaration property) {
        if (property == null) {
            throw new IllegalArgumentException("property must not be null"); //$NON-NLS-1$
        }
        if (property.getType() instanceof BasicType) {
            BasicType bt = (BasicType) property.getType();
            switch (bt.getKind()) {
            case BOOLEAN:
                return boolean.class;
            case DATE:
                return Date.class;
            case DATETIME:
                return DateTime.class;
            case DECIMAL:
                return BigDecimal.class;
            case DOUBLE:
                return double.class;
            case FLOAT:
                return float.class;
            case BYTE:
                return byte.class;
            case SHORT:
                return short.class;
            case INT:
                return int.class;
            case LONG:
                return long.class;
            case TEXT:
                return Text.class;
            default:
                throw new IllegalArgumentException(MessageFormat.format(
                        "Unsupported basic type: {0}", //$NON-NLS-1$
                        bt.getKind()));
            }
        }
        throw new IllegalArgumentException();
    }
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.type.BasicType

    private boolean isBoolean(PropertyDeclaration property) {
        assert property != null;
        if ((property.getType() instanceof BasicType) == false) {
            return false;
        }
        BasicType type = (BasicType) property.getType();
        return type.getKind() == BasicTypeKind.BOOLEAN;
    }
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.type.BasicType

    @Override
    public BasicType resolve(DmdlSemantics world, AstType syntax) {
        if (syntax instanceof AstBasicType) {
            AstBasicType ast = (AstBasicType) syntax;
            return new BasicType(ast, ast.kind);
        }
        return null;
    }
View Full Code Here

Examples of com.asakusafw.dmdl.thundergate.model.BasicType

     * @throws Exception if test was failed
     */
    @Test
    public void table_cached() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .toDescription();

        Configuration config = config();
        config.setSidColumn("SID");
        config.setTimestampColumn("TIMESTAMP");
View Full Code Here

Examples of com.asakusafw.dmdl.thundergate.model.BasicType

     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_with_delete() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

        Configuration config = config();
        config.setSidColumn("SID");
        config.setTimestampColumn("TIMESTAMP");
View Full Code Here

Examples of com.asakusafw.dmdl.thundergate.model.BasicType

     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_no_sid() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

        Configuration config = config();
        config.setSidColumn("SID");
        config.setTimestampColumn("TIMESTAMP");
View Full Code Here

Examples of com.asakusafw.dmdl.thundergate.model.BasicType

     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_invalid_sid() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.INT))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

        Configuration config = config();
        config.setSidColumn("SID");
        config.setTimestampColumn("TIMESTAMP");
View Full Code Here

Examples of com.asakusafw.dmdl.thundergate.model.BasicType

     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_no_timestamp() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

        Configuration config = config();
        config.setSidColumn("SID");
        config.setTimestampColumn("TIMESTAMP");
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.