org.apache.ibatis.abator.api
Class GeneratedFile

java.lang.Object
  extended byorg.apache.ibatis.abator.api.GeneratedFile
Direct Known Subclasses:
GeneratedJavaFile, GeneratedXmlFile

public abstract class GeneratedFile
extends java.lang.Object

Abstract class that holds information common to all generated files.

Author:
Jeff Butler

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

Constructor Detail

GeneratedFile

public GeneratedFile()
Method Detail

getContent

public abstract java.lang.String getContent()
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.apache.ibatis.abator.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 java.lang.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 java.lang.String getTargetProject()
Gets the target project. Clients can call this method to determine how to save the results.

Returns:
the target project

setTargetProject

public void setTargetProject(java.lang.String targetProject)
Sets the target project. This property is set from the configuration. Clients should not call this method.

Parameters:
targetProject - the target project

getTargetPackage

public abstract java.lang.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.