Introduce the data class configuration, which is mainly used for data classes that need to convert the database MySQL data into Java objects and then convert them to AS3 objects.
The configuration file is in XML format.
<Objects> <Objectname= "Tuservo"TableName= "V_user"Note= "comment"author= "Idoublewei"> <Fieldname= "id"type= "integer"Restrict= "PRIMARY Key"value= "0"Note= "Identity"/> <Fieldname= "Name"type= "String|32"Restrict= "NOT NULL"value=""Note= "nickname"/> </Object></Objects>
There can be only one root node objects in the configuration, each child node object represents a data class, and each child node of Object field represents a property of the data class
Object:
---name represents the data class name, you must specify
---tableName represents the generated MySQL corresponding table name, and if you do not specify this property, name is used as the table name
---Note data class comment, you can not specify
---Author data class Creator, you can not specify
Field:
---name represents the property name of the data class, you must specify
---type represents the Data class property type and must be specified (case sensitive)
------string to represent strings, followed by the symbol "|" + number, which represents the length of the string, for example-string|32, followed by the symbol "|text", indicating that the database uses the text type
------integer representing integers
------unsigned represents nonnegative integers
------Decimal means decimal
------BOOL Represents a Boolean value
------Date
---Restrict represents a database field constraint and is output as-is, you can not specify
---value represents the default value for the Data class property (the database defaults to null), and you can not specify
------If type is bool, you can only take a value: true, False
------If type is date, you can take a value: New-New object, MS-date millisecond number, followed by symbol "|" + number, for example-ms|428,format-date string, followed by symbol "|" + Date format character, for example-format|14- 04-16 20:15:36 637
---Note data class Property comments, you can not specify
It is important to note that when specifying a data class property type, if the specified type is not in the list of supported types, it is output as-is, such as a configuration property of
<name= "attr" type= "Com.vo.MyClass" value= "null "/>
The output is
---as3:var attr:com.vo.MyClass = null;
---java:com.vo.MyClass attr = null;
---mysql:attr com.vo.MyClass null,