## ============================================================================ ## Filename : BusinessObjectProxyTemplate.vm ## Note(s) : This template is used to generate a BusinessObjectProxy Java class. ## ## Note: The generated code is dependent on the ThinkUI framework. ## Please refer to the SQL Client documentation for details. ## ## Copyright (c) 2007 ThinkUI Software Inc. All rights reserved. ## ============================================================================ ## ## **************************************************************************** ## The following variables are available in this template. For more ## information on any of the following variable, please refer to the user guide. ## **************************************************************************** ## $projectName ## $authorName ## $headerText ## $className ## $packageName ## $subPackageName ## $prjPkgName ## $prjClassPrefix ## $superClassName ## $date ## $codeGen ## $tableNames ## #if ($packageName) package $packageName; #end #parse( "ClassHeaderInclude.vm" ) import thinkui.common.SearchResultsData; import thinkui.db.attribute.AttributeType; import thinkui.proxy.BusinessObjectProxy; #foreach( $tableData in $tableNames ) #set( $constantName = ${tableData.getTableName().toUpperCase()} ) #set( $objectName = ${codeGen.toClassName($constantName)} ) import ${subPackageName}.criteria.${objectName}SearchData; import ${subPackageName}.objects.${objectName}; #end /** * Interface to access all business methods required by the $prjClassPrefix application. * This interface is implemented by either a Local${className} or an EJB${className} * as required. Application code should only work with the ${className} interface. * This allows the decision on how business objects should be deployed to be * left until deployment time. The WebCommandContext.lookupProxy() should be * used to get access to the ${className} interface. */ public interface ${className} extends ${superClassName} { // The name of the proxy class. public static final String NAME = ${className}.class.getName(); #foreach( $tableData in $tableNames ) #set( $constantName = ${tableData.getTableName().toUpperCase()} ) #set( $objectName = ${codeGen.toClassName($constantName)} ) #set( $objectVar = ${codeGen.toIdentifier($objectName)} ) // // ${objectName} related methods. // public AttributeType create${objectName}EnumType() throws Exception; public SearchResultsData find${objectName}(${objectName}SearchData searchData) throws Exception; public ${objectName} get${objectName}(Object ${objectVar}Id) throws Exception; public ${objectName} save${objectName}(${objectName} ${objectVar}) throws Exception; public void delete${objectName}(Object ${objectVar}Id) throws Exception; public int delete${codeGen.toPlural($objectName)}(java.util.Set ${objectVar}Ids) throws Exception; public int update${codeGen.toPlural($objectName)}(java.util.Set ${objectVar}Ids, ${objectName} ${objectVar}) throws Exception; #end }