mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
This commit is contained in:
parent
18b5754054
commit
f612932ee1
@ -25,13 +25,15 @@ class ScalaBeanSerializer extends Serializer {
|
||||
val simpleName = model.getSimpleName;
|
||||
|
||||
// package
|
||||
if (!model.getPackageName.isEmpty()) {
|
||||
if (!model.getPackageName.isEmpty) {
|
||||
writer.packageDecl(model.getPackageName);
|
||||
}
|
||||
|
||||
// imports
|
||||
val importedClasses = getAnnotationTypes(model);
|
||||
importedClasses.add("scala.reflect.BeanProperty");
|
||||
if (javaBeanSupport) {
|
||||
importedClasses.add("scala.reflect.BeanProperty");
|
||||
}
|
||||
if (model.hasLists()) {
|
||||
importedClasses.add(classOf[List[_]].getName);
|
||||
}
|
||||
|
||||
@ -45,15 +45,13 @@ class ScalaMetaDataSerializer(val namePrefix: String, val namingStrategy: Naming
|
||||
importedClasses.add(classOf[Map[_, _]].getName);
|
||||
}
|
||||
|
||||
importedClasses.foreach({ writer.importClasses(_) })
|
||||
writer.importClasses(importedClasses.toArray: _*);
|
||||
|
||||
// javadoc
|
||||
writer.javadoc(simpleName + javadocSuffix);
|
||||
|
||||
// header
|
||||
model.getAnnotations foreach { annotation =>
|
||||
writer.annotation(annotation);
|
||||
}
|
||||
model.getAnnotations.foreach(writer.annotation(_));
|
||||
|
||||
val queryType = typeMappings.getPathType(model, model, true);
|
||||
var modelName = writer.getRawName(model);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user