本文整理汇总了Java中com.baomidou.mybatisplus.generator.config.rules.DbColumnType.LONG属性的典型用法代码示例。如果您正苦于以下问题:Java DbColumnType.LONG属性的具体用法?Java DbColumnType.LONG怎么用?Java DbColumnType.LONG使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.baomidou.mybatisplus.generator.config.rules.DbColumnType
的用法示例。
在下文中一共展示了DbColumnType.LONG属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processTypeConvert
@Override
public DbColumnType processTypeConvert(String fieldType) {
String t = fieldType.toLowerCase();
if (t.contains("char") || t.contains("text") || t.contains("xml")) {
return DbColumnType.STRING;
} else if (t.contains("bigint")) {
return DbColumnType.LONG;
} else if (t.contains("int")) {
return DbColumnType.INTEGER;
} else if (t.contains("date") || t.contains("time")) {
return DbColumnType.DATE;
} else if (t.contains("text")) {
return DbColumnType.STRING;
} else if (t.contains("bit")) {
return DbColumnType.BOOLEAN;
} else if (t.contains("decimal") || t.contains("numeric")) {
return DbColumnType.DOUBLE;
} else if (t.contains("money")) {
return DbColumnType.BIG_DECIMAL;
} else if (t.contains("binary") || t.contains("image")) {
return DbColumnType.BYTE_ARRAY;
} else if (t.contains("float") || t.contains("real")) {
return DbColumnType.FLOAT;
}
return DbColumnType.STRING;
}
示例2: processTypeConvert
@Override
public DbColumnType processTypeConvert(String fieldType) {
String t = fieldType.toLowerCase();
if (t.contains("char") || t.contains("text")) {
return DbColumnType.STRING;
} else if (t.contains("bigint")) {
return DbColumnType.LONG;
} else if (t.contains("int")) {
return DbColumnType.INTEGER;
} else if (t.contains("date") || t.contains("time") || t.contains("year")) {
return DbColumnType.DATE;
} else if (t.contains("text")) {
return DbColumnType.STRING;
} else if (t.contains("bit")) {
return DbColumnType.BOOLEAN;
} else if (t.contains("decimal")) {
return DbColumnType.BIG_DECIMAL;
} else if (t.contains("clob")) {
return DbColumnType.CLOB;
} else if (t.contains("blob")) {
return DbColumnType.BYTE_ARRAY;
} else if (t.contains("float")) {
return DbColumnType.FLOAT;
} else if (t.contains("double")) {
return DbColumnType.DOUBLE;
} else if (t.contains("json") || t.contains("enum")) {
return DbColumnType.STRING;
} else if (t.contains("boolean")) {
return DbColumnType.BOOLEAN;
}
return DbColumnType.STRING;
}
示例3: processTypeConvert
@Override
public DbColumnType processTypeConvert(String fieldType) {
String t = fieldType.toLowerCase();
if (t.contains("char") || t.contains("text")) {
return DbColumnType.STRING;
} else if (t.contains("bigint")) {
return DbColumnType.LONG;
} else if (t.contains("int")) {
return DbColumnType.INTEGER;
} else if (t.contains("date") || t.contains("time") || t.contains("year")) {
return DbColumnType.DATE;
} else if (t.contains("text")) {
return DbColumnType.STRING;
} else if (t.contains("bit")) {
return DbColumnType.BOOLEAN;
} else if (t.contains("decimal")) {
return DbColumnType.BIG_DECIMAL;
} else if (t.contains("clob")) {
return DbColumnType.CLOB;
} else if (t.contains("blob")) {
return DbColumnType.BLOB;
} else if (t.contains("binary")) {
return DbColumnType.BYTE_ARRAY;
} else if (t.contains("float")) {
return DbColumnType.FLOAT;
} else if (t.contains("double")) {
return DbColumnType.DOUBLE;
} else if (t.contains("json") || t.contains("enum")) {
return DbColumnType.STRING;
}
return DbColumnType.STRING;
}
示例4: processTypeConvert
@Override
public DbColumnType processTypeConvert(String fieldType) {
String t = fieldType.toUpperCase();
if (t.contains("CHAR")) {
return DbColumnType.STRING;
} else if (t.contains("DATE") || t.contains("TIMESTAMP")) {
return DbColumnType.DATE;
} else if (t.contains("NUMBER")) {
if (t.matches("NUMBER\\(+\\d\\)")) {
return DbColumnType.INTEGER;
} else if (t.matches("NUMBER\\(+\\d{2}+\\)")) {
return DbColumnType.LONG;
}
return DbColumnType.DOUBLE;
} else if (t.contains("FLOAT")) {
return DbColumnType.FLOAT;
} else if (t.contains("clob")) {
return DbColumnType.CLOB;
} else if (t.contains("BLOB")) {
return DbColumnType.OBJECT;
} else if (t.contains("binary")) {
return DbColumnType.BYTE_ARRAY;
} else if (t.contains("RAW")) {
return DbColumnType.BYTE_ARRAY;
}
return DbColumnType.STRING;
}