ojb.model_broken.Object.vm Maven / Gradle / Ivy
## Licensed to the Apache Software Foundation (ASF) under one
## or more contributor license agreements. See the NOTICE file
## distributed with this work for additional information
## regarding copyright ownership. The ASF licenses this file
## to you under the Apache License, Version 2.0 (the
## "License"); you may not use this file except in compliance
## with the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing,
## software distributed under the License is distributed on an
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
## KIND, either express or implied. See the License for the
## specific language governing permissions and limitations
## under the License.
package ${package};
#if ($table.BaseClass)
#set ($extendsBaseClass = "extends $table.BaseClass" )
#else
#set ($extendsBaseClass = "" )
#end
#if ($table.Interface)
#if ($ojbUseInterface == true)
#set ($interface = "Serializable, ${basePrefix}${table.JavaName}Interface, $table.Interface" )
#else
#set ($interface = "Serializable, $table.Interface" )
#end
#else
#if ($ojbUseInterface == true)
#set ($interface = "Serializable, ${basePrefix}${table.JavaName}Interface" )
#else
#set ($interface = "Serializable" )
#end
#end
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
/**
#if ($addTimeStamp)
* This class was autogenerated by Torque on:
*
* [$now]
*
#end
* You should not use this class directly. It should not even be
* extended all references should be to $table.JavaName
*/
public class ${basePrefix}${table.JavaName} $extendsBaseClass
implements $interface
{
#foreach ($col in $table.Columns)
#set ( $cjtype = $col.JavaPrimitive )
#set ( $clo=$col.Name.toLowerCase() )
#set ( $defaultValue = "null" )
#if ( $cjtype == "boolean")
#set ( $defaultValue = "false" )
#elseif ($cjtype == "int")
#set ( $defaultValue = "0" )
#end
private $cjtype $clo = $defaultValue;
#end
#foreach ($col in $table.Columns)
#set ( $cfc=$col.JavaName )
#set ( $cfc=$cfc.replaceFirst(".", $cfc.substring(0,1).toUpperCase()) )
#set ( $clo=$col.Name.toLowerCase() )
#set ( $cjtype = $col.JavaPrimitive )
/**
* Get the $cfc
* @return $cjtype
*/
public $cjtype get${cfc}()
{
return $clo;
}
/**
* Set the value of $cfc
*/
public void set${cfc}($cjtype v )
{
this.$clo = v;
}
#end
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy