org.kuali.student.jpa.mojo
Class JpaDaoWriter

java.lang.Object
  extended by org.kuali.student.contract.writer.XmlWriter
      extended by org.kuali.student.contract.writer.JavaClassWriter
          extended by org.kuali.student.jpa.mojo.JpaDaoWriter

public class JpaDaoWriter
extends JavaClassWriter

Author:
nwright

Nested Class Summary
protected static class JpaDaoWriter.MethodType
          The standard type of methods used in our Service contract.
 
Field Summary
protected  ModelFinder finder
           
protected  ServiceContractModel model
           
protected  String servKey
          Name of the service being operated on.
 
Constructor Summary
JpaDaoWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, XmlType xmlType, boolean isR1)
           
JpaDaoWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, XmlType xmlType, boolean isR1, String packageName, String className)
           
 
Method Summary
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  JpaDaoWriter.MethodType calcMethodType(ServiceMethod method)
           
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
 
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
 

Field Detail

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

Constructor Detail

JpaDaoWriter

public JpaDaoWriter(ServiceContractModel model,
                    String directory,
                    String rootPackage,
                    String servKey,
                    List<ServiceMethod> methods,
                    XmlType xmlType,
                    boolean isR1)

JpaDaoWriter

public JpaDaoWriter(ServiceContractModel model,
                    String directory,
                    String rootPackage,
                    String servKey,
                    List<ServiceMethod> methods,
                    XmlType xmlType,
                    boolean isR1,
                    String packageName,
                    String className)
Method Detail

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 JpaDaoWriter.MethodType calcMethodType(ServiceMethod method)

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.