类 CodeWriter
java.lang.Object
gu.sql2java.generator.CodeWriter
-
字段概要
字段修饰符和类型字段说明protected static Stringstatic Stringtype for byte array,default 'byte[]',defined in propertiesstatic Stringprotected org.apache.velocity.VelocityContextprotected static Stringprotected static Databaseprotected static final Stringprotected static final Stringprotected static Stringprotected static Stringstatic Stringstatic final Stringprotected static Stringprotected static Stringprotected static Propertiesprotected static Stringprotected static Stringprotected org.apache.velocity.VelocityContext -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanauthorizeFile(String folder, String schemaOrTable) static booleanauthorizeProcess(String autorizePattern, String includeProperty, String excludeProperty) static booleanvoidbooleancheckTable(Table newTable) static booleanfolderContainsPattern(String folder, String[] patterns) static StringClass<?>static Stringstatic intstatic intstatic Stringstatic Stringstatic intstatic Stringstatic StringgetDb()static String[]getExplodedString(String value) getExplodedStringAsList(String value) static Stringstatic Booleanstatic Stringstatic StringgetProperty(String key) static StringgetProperty(String key, String defaultVal) static booleangetPropertyBoolean(String value) static String[]static String[]getPropertyExploded(String mkey, String defaultValue) getPropertyExplodedAsList(String mkey, String defaultValue) static IntegergetPropertyInteger(String value) static StringgetPropertyRequired(String property) static StringString[]getSchemaTemplates(String property) static StringgetSourceFile(String baseDir, Class<?> clazz) 返回类的源文件位置static Stringstatic Table[]getTable()String[]getTableTemplates(String property) String[]getTemplates(String property, boolean perShema) static booleanstatic booleanstatic booleanstatic booleanstatic Class<?>loadExtensionClass(String classname) 加载指定的类
读取 'extension.tools.libdirs','extension.tools.classpath'分别对应libdirs,classpath参数
如果上述property都没有定义则抛出异常使用当前类的class loader加载工具对象voidvoidprocess()recurseTemplate(Vector<String> files, String folder, boolean perSchema) voidsetCurrentFilename(String relpath_or_package, String fn) voidsetCurrentJavaFilename(String relpath_or_package, String fn) voidsetDestinationFolder(String destDir) static voidsetFillNull(Boolean fill) voidsetSaveCurrentFile(boolean save_current_fullfile) voidwriteComponent(String templateName)
-
字段详细资料
-
NEW_LINE
-
DEFAULT_BINARY_TYPE
- 另请参阅:
-
DEFAULT_BITSTAE_TYPE
- 另请参阅:
-
props
-
MGR_CLASS
-
dateClassName
-
timeClassName
-
timestampClassName
-
binaryClassName
type for byte array,default 'byte[]',defined in properties -
db
-
includeHash
-
excludeHash
-
basePackage
-
destDir
-
optimisticLockType
-
optimisticLockColumn
-
geometrySerialType
-
classPrefix
-
vc
protected org.apache.velocity.VelocityContext vc -
table
-
current_vc
protected org.apache.velocity.VelocityContext current_vc
-
-
构造器详细资料
-
CodeWriter
-
-
方法详细资料
-
setDestinationFolder
- 抛出:
Exception
-
checkTable
- 抛出:
Exception
-
checkDatabase
- 抛出:
Exception
-
process
- 抛出:
Exception
-
writeComponent
- 抛出:
Exception
-
setCurrentFilename
- 抛出:
Exception
-
setCurrentJavaFilename
- 抛出:
Exception
-
log
-
getClassPrefix
-
getDb
-
getTables
-
getTable
-
getRelationTables
-
tableName
-
getTable
-
getProperty
-
getProperty
-
getPropertyRequired
-
getPropertyExploded
-
getPropertyExplodedAsSet
-
getPropertyExplodedAsList
-
getPropertyExplodedAsList
-
getPropertyExploded
-
getExplodedStringAsList
-
getExplodedString
-
getPropertyBoolean
-
getPropertyInteger
-
getClassLoadingPath
-
getLoadingPathExt
-
getSchemaTemplates
-
getTableTemplates
-
getTemplates
-
recurseTemplate
-
authorizeProcess
-
folderContainsPattern
-
authorizeFile
-
getBinaryClassName
-
isByteBufferAsString
public static boolean isByteBufferAsString() -
getBitStateClassName
-
getBitStateClassWrapName
-
getBitStateClass
-
getBitStateClassSize
public static int getBitStateClassSize() -
getBitStateConstSuffix
-
getBitStateMask
public static int getBitStateMask() -
getBitStateMaskHex
-
getBitStateClassShift
public static int getBitStateClassShift() -
binaryIsByteBuffer
public static boolean binaryIsByteBuffer() -
getExtensionPkg
-
setSaveCurrentFile
public void setSaveCurrentFile(boolean save_current_fullfile) -
loadExtensionClass
加载指定的类
读取 'extension.tools.libdirs','extension.tools.classpath'分别对应libdirs,classpath参数
如果上述property都没有定义则抛出异常- 参数:
classname-- 返回:
- 加载的类
- 抛出:
ClassNotFoundException
-
loadTool
public Object loadTool(String classname) throws ClassNotFoundException, InstantiationException, IllegalAccessException 使用当前类的class loader加载工具对象- 参数:
classname-- 返回:
- 创建的对象
- 抛出:
ClassNotFoundExceptionInstantiationExceptionIllegalAccessException
-
getSourceFile
返回类的源文件位置- 参数:
baseDir- 源文件夹clazz-
-
getFillNull
-
setFillNull
-
isJsonJacksonRawValue
public static boolean isJsonJacksonRawValue() -
isJacksonClassDeserializer
public static boolean isJacksonClassDeserializer()- 从以下版本开始:
- 3.21.3
-
isFastjsonClassDeserializer
public static boolean isFastjsonClassDeserializer()- 从以下版本开始:
- 3.21.3
-
getGeometrySerialType
-
getSuperClassPackage
- 从以下版本开始:
- 3.31.0
-
getSuperClassTablenames
- 从以下版本开始:
- 3.31.0
-
getSuperClassTables
- 从以下版本开始:
- 3.31.0
-
getSamePrefixOfSuperClassTables
- 从以下版本开始:
- 3.31.0
-