# Copyright 2001-2005 The Apache Software Foundation.
#
# Licensed 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.

# -------------------------------------------------------------------
#
# T O R Q U E  C O N F I G U R A T I O N  F I L E
#
# $Id$
#
# -------------------------------------------------------------------
# This file contains the most commonly used properties. For a
# a complete list of build properties, please refer to:
#   http://jakarta.apache.org/turbine/torque/properties-reference.xml
# -------------------------------------------------------------------

# -------------------------------------------------------------------
#
#  P R O J E C T
#
# -------------------------------------------------------------------
# This is the name of your Torque project. Your non-Java generated
# files will be named using the project name selected below. If your
# project=killerapp then you will have a generated:
#
#   killerapp-schema.sql
#
# The custom is then to also rename your project XML schema from
# project-schema.xml to killerapp-schema.xml. This is required
# for a few targets such as datasql, datadump, and datadtd.
# -------------------------------------------------------------------

torque.project = workstyle


# -------------------------------------------------------------------
#
#  T A R G E T  D A T A B A S E
#
# -------------------------------------------------------------------
# This is the target database, only considered when generating
# the SQL for your Torque project. Your possible choices are:
#
#   axion, cloudscape, db2, db2400, hypersonic, interbase, msaccess
#   mssql, mysql, oracle, postgresql, sapdb, sybase
# -------------------------------------------------------------------

torque.database = derby


# -------------------------------------------------------------------
#
#  O B J E C T  M O D E L  I N F O R M A T I O N
#
# -------------------------------------------------------------------
# These settings will allow you to customize the way your
# Peer-based object model is created.
# -------------------------------------------------------------------
# addGetByNameMethod
#   If true, Torque adds methods to get database fields by name/position.
#
# addIntakeRetrievable
#   If true, the data objects will implement Intake's Retrievable
#   interface
#
# addSaveMethod
#   If true, Torque adds tracking code to determine how to save objects.
#
# addTimeStamp
#   If true, Torque true puts time stamps in generated om files.
#
# basePrefix
#   A string to pre-pend to the file names of base data and peer objects.
#
# complexObjectModel
#   If true, Torque generates data objects with collection support and
#   methods to easily retreive foreign key relationships.
#
# targetPackage
#   Sets the Java package the om files will generated to, e.g.
#   "com.company.project.om".
#
# useClasspath
#   If true, Torque will not look in the <code>templatePath</code> directory,
#   for templates, but instead load them from the classpath, allowing you to
#   use Torque without extracted it from the jar.
#
# useManagers
#   If true, Torque will generate Manager classes that use JCS for caching.
#   Still considered experimental.
#
# objectIsCaching
#   If true, Torque generates data objects that cache their foreign
#   key relationships. If this is not desired (because the underlying objects
#   can be manipulated from other code), set this property to false. This currently
#   cannot combined with the manager setting from above.
#
# silentDbFetch
#   If true, the getXXX() methods which retrieve associated objects
#   will fetch the associated objects silently. If false, only the
#   methods where a connection is specified explicitly will
#   fetch the associated objects silently; the methods where no connection
#   is specified will not do a silent fetch and return null if no previous
#   explicit fetch was made.
#   This setting has no effect if objectIsCaching is set to false.
#
#
# generateBeans
#   If true, Torque will generate an additional bean for each data object,
#   plus methods to create beans from data objects and vice versa
#
# beanSuffix
#   A String to append to the class name of generated beans (if they are generated)

# -------------------------------------------------------------------

torque.targetPackage = net.yher.workstyle.torque

torque.addGetByNameMethod = true
torque.addIntakeRetrievable = false
torque.addSaveMethod = true
torque.addTimeStamp = true
torque.basePrefix = Base
torque.complexObjectModel = true
torque.useClasspath = true
torque.useManagers = false
torque.objectIsCaching = true
torque.silentDbFetch = true
torque.generateBeans = true
torque.beanSuffix = Bean

# -------------------------------------------------------------------
#
#  D A T A B A S E  S E T T I N G S
#
# -------------------------------------------------------------------
# JDBC connection settings. This is used by the JDBCToXML task that
# will create an XML database schema from JDBC metadata. These
# settings are also used by the SQL Ant task to initialize your
# Torque system with the generated SQL.
#
# sameJavaName
#   If true, the JDBC task will set the javaName attribute for the tables
#   and columns to be the same as SQL name.
# -------------------------------------------------------------------

torque.database.createUrl = jdbc:derby://localhost:1527/workstyleDB
torque.database.buildUrl = jdbc:derby://localhost:1527/workstyleDB
torque.database.url = jdbc:derby://localhost:1527/workstyleDB
torque.database.driver = org.apache.derby.jdbc.ClientDriver
torque.database.schema = workstyle
torque.database.user = workstyle
torque.database.password = hogehoge
torque.database.host = localhost

torque.sameJavaName = false


torque.database.manualCreation = true
torque.java.dir = ${project.home}/web/WEB-INF/src

outputDirectory = src
schemaDirectory = src/schema
templatePath = templates
useClasspath = false

torque.home = ${project.home}/torque-gen
torque.output.dir = ${torque.home}/${outputDirectory}
torque.schema.dir = ${torque.home}/${schemaDirectory}

torque.generateDeprecated = false

