Support java code generation for UUIDProperty

A property defined as "type: string & format: uuid" is now generated in
Java using "java.util.UUID" class instead of a classical String. In the
Java, the UUID class do not provide a constructor. You may use the
method UUID.fromString(<uuid_string>) to construct your UUID object.
This commit is contained in:
Maelig Nantel 2016-01-15 12:39:25 +01:00
parent 2a5bd0a80e
commit faa4ecd0cd

View File

@ -651,6 +651,8 @@ public class DefaultCodegen {
datatype = "map"; datatype = "map";
} else if (p instanceof DecimalProperty) { } else if (p instanceof DecimalProperty) {
datatype = "number"; datatype = "number";
} else if ( p instanceof UUIDProperty) {
datatype = "UUID";
} else if (p instanceof RefProperty) { } else if (p instanceof RefProperty) {
try { try {
RefProperty r = (RefProperty) p; RefProperty r = (RefProperty) p;