org.kuali.student.jpa.mojo
Class JpaEntityWriter
java.lang.Object
org.kuali.student.contract.writer.XmlWriter
org.kuali.student.contract.writer.JavaClassWriter
org.kuali.student.jpa.mojo.JpaEntityWriter
public class JpaEntityWriter
- extends JavaClassWriter
- Author:
- nwright
Constructor Summary |
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)
|
Methods inherited from class org.kuali.student.contract.writer.JavaClassWriter |
closeBrace, getBody, getClassName, getDirectory, getFileName, getPackageName, getRootDirectory, importsAdd, indentPrintWrappedComment, openBrace, setPackageName, writeHeader, writeImports, writeJavaClassAndImportsOutToFile |
Methods inherited from class org.kuali.student.contract.writer.XmlWriter |
decrementIndent, escapeXML, getIndent, getOut, incrementIndent, indent, indent, indentPrint, indentPrintln, print, println, setIndent, setOut, writeAttribute, writeComment, writeCommentBox, writeTag, writeTag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
protected ServiceContractModel model
finder
protected ModelFinder finder
servKey
protected String servKey
- Name of the service being operated on. If it is a RICE service it is
prefixed with RICE. [11:32:18 AM] Norman Wright: short name... I think it
gets it by taking the java class SimpleName and stripping off the word
"Service" and I think making it lower case. [11:32:24 AM] Norman Wright:
so OrganizationService becomes organization
JpaEntityWriter
public JpaEntityWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
XmlType xmlType,
boolean isR1)
JpaEntityWriter
public JpaEntityWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
XmlType xmlType,
boolean isR1,
String packageName,
String className)
calcPackage
public static String calcPackage(String servKey,
String rootPackage)
- Returns the jpa implementation package name.
- Parameters:
servKey
- rootPackage
-
- Returns:
fixServKey
protected static String fixServKey(String servKey)
calcClassName
public static String calcClassName(String servKey,
XmlType xmlType)
- Given the service key (name), returns a calculated class name for the jpa
impl.
calcInfcName
public static String calcInfcName(XmlType xmlType)
calcMethodType
protected JpaEntityWriter.MethodType calcMethodType(ServiceMethod method)
- Analyses the method and returns a MethodType enum that describes what
type of method this is.
write
public void write()
- Write out the entire file
initLower
protected String initLower(String str)
calcObjectName
protected String calcObjectName(ServiceMethod method)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.