public class JpaEntityWriter extends JavaClassWriter
Modifier and Type | Class and Description |
---|---|
protected static class |
JpaEntityWriter.MethodType
The standard type of methods used in our Service contract.
|
Modifier and Type | Field and Description |
---|---|
protected ModelFinder |
finder |
protected ServiceContractModel |
model |
protected String |
servKey
Name of the service being operated on.
|
Constructor and Description |
---|
JpaEntityWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
XmlType xmlType,
boolean isR1) |
JpaEntityWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
XmlType xmlType,
boolean isR1,
String packageName,
String className) |
Modifier and Type | Method and Description |
---|---|
static String |
calcClassName(String servKey,
XmlType xmlType)
Given the service key (name), returns a calculated class name for the jpa
impl.
|
static String |
calcInfcName(XmlType xmlType) |
protected JpaEntityWriter.MethodType |
calcMethodType(ServiceMethod method)
Analyses the method and returns a MethodType enum that describes what
type of method this is.
|
protected String |
calcObjectName(ServiceMethod method) |
static String |
calcPackage(String servKey,
String rootPackage)
Returns the jpa implementation package name.
|
protected static String |
fixServKey(String servKey) |
protected String |
initLower(String str) |
void |
write()
Write out the entire file
|
closeBrace, getBody, getClassName, getDirectory, getFileName, getPackageName, getRootDirectory, importsAdd, indentPrintWrappedComment, openBrace, setPackageName, writeHeader, writeImports, writeJavaClassAndImportsOutToFile
decrementIndent, escapeXML, getIndent, getOut, incrementIndent, indent, indent, indentPrint, indentPrintln, print, println, setIndent, setOut, writeAttribute, writeComment, writeCommentBox, writeTag, writeTag
protected ServiceContractModel model
protected ModelFinder finder
protected String servKey
public JpaEntityWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, XmlType xmlType, boolean isR1)
public JpaEntityWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, XmlType xmlType, boolean isR1, String packageName, String className)
public static String calcPackage(String servKey, String rootPackage)
servKey
- rootPackage
- protected static String fixServKey(String servKey)
public static String calcClassName(String servKey, XmlType xmlType)
public static String calcInfcName(XmlType xmlType)
protected JpaEntityWriter.MethodType calcMethodType(ServiceMethod method)
public void write()
protected String calcObjectName(ServiceMethod method)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.