Package com.alibaba.druid.support.monitor.dao.MonitorDaoJdbcImpl

Examples of com.alibaba.druid.support.monitor.dao.MonitorDaoJdbcImpl.FieldInfo


        buf.append(", host varchar(128)");
        buf.append(", pid int(10)  NOT NULL");
        buf.append(", collectTime datetime NOT NULL");
        List<FieldInfo> fields = beanInfo.getFields();
        for (int i = 0; i < fields.size(); ++i) {
            FieldInfo field = fields.get(i);
            buf.append(", ");
            buf.append(field.getColumnName());
            if (field.getFieldType().equals(int.class) || field.getFieldType().equals(Integer.class)) {
                buf.append(" int(10)");
            } else if (field.getFieldType().equals(long.class) || field.getFieldType().equals(Long.class)) {
                buf.append(" bigint(20)");
            } else if (field.getFieldType().equals(String.class)) {
                buf.append(" varchar(256)");
            } else if (field.getFieldType().equals(Date.class)) {
                buf.append(" datetime");
            } else if (field.getFieldType().equals(boolean.class) || field.getFieldType().equals(Boolean.class)) {
                buf.append(" int(1)");
            }
        }
        buf.append(", PRIMARY KEY(id)");
        buf.append(");");
View Full Code Here

TOP

Related Classes of com.alibaba.druid.support.monitor.dao.MonitorDaoJdbcImpl.FieldInfo

Copyright © 2018 www.massapicom. 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.