org.mybatis.generator.api
Class GeneratedFile

java.lang.Object
  extended by org.mybatis.generator.api.GeneratedFile
Direct Known Subclasses:
GeneratedJavaFile, GeneratedXmlFile

public abstract class GeneratedFile
extends Object

Abstract class that holds information common to all generated files.

Author:
Jeff Butler

Field Summary
protected  String targetProject
           
 
Constructor Summary
GeneratedFile(String targetProject)
           
 
Method Summary
abstract  String getFileName()
          Get the file name (without any path).
abstract  String getFormattedContent()
          This method returns the entire contents of the generated file.
abstract  String getTargetPackage()
          Get the target package for the file.
 String getTargetProject()
          Gets the target project.
abstract  boolean isMergeable()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

targetProject

protected String targetProject
Constructor Detail

GeneratedFile

public GeneratedFile(String targetProject)
Method Detail

getFormattedContent

public abstract String getFormattedContent()
This method returns the entire contents of the generated file. Clients can simply save the value returned from this method as the file contents. Subclasses such as @see org.mybatis.generator.api.GeneratedJavaFile offer more fine grained access to file parts, but still implement this method in the event that the entire contents are desired.

Returns:
Returns the content.

getFileName

public abstract String getFileName()
Get the file name (without any path). Clients should use this method to determine how to save the results.

Returns:
Returns the file name.

getTargetProject

public String getTargetProject()
Gets the target project. Clients can call this method to determine how to save the results.

Returns:
the target project

getTargetPackage

public abstract String getTargetPackage()
Get the target package for the file. Clients should use this method to determine how to save the results.

Returns:
Returns the target project.

toString

public String toString()
Overrides:
toString in class Object

isMergeable

public abstract boolean isMergeable()


Copyright © 2010-2012 MyBatis.org. All Rights Reserved.