Build-time Properties

ビルド時のプロパティ

These properties are set in the build.properties file or the file of your chosing, specificed by the torque.contextProperties property. They affect how Torque generates Java and SQL code for your project.

これらのプロパティはbuild.propertiesファイルやtorque.contextPropertiesで指定することで選択したファイルで設定されます。これらはTorqueがプロジェクト用のJavaのコードやSQLのコードを生成する方法に影響します。

Property プロパティ Default デフォルト値 Description 説明
Basic Properties 基本プロパティ
torque.project N/A The name of the project Torque will generate code for. After choosing the project name, your XML schema file (originally project-schema.xml), that Torque will read should be renamed to ${torque.project}-schema.xml.
Torqueがコードを生成するプロジェクトの名前。 プロジェクト名をつけた後、Torqueが読み込むXMLスキーマファイル(元はproject-schema.xml)を${torque.project}-schema.xmlに名前を変更するべきです。
torque.database N/A Torque must know the target database platform in order to generate the appropriate Java and SQL code. Currently supported values are: axion, cloudscape, db2, db2400, hypersonic, interbase, mssql, mysql, oracle, postgresql, sapdb, and sybase.
Torqueは適切なJavaコードやSQLコードを生成するために、対象のデータベースプラットホームを知る必要があります。 現在サポートされている値として、axion、cloudscape、db2、db2400、hypersonic、interbase、mssql、mysql、oracle、postgresql、sapdb、sybase があります。
torque.targetPackage N/A The Java package that Torque will put the generated classes in. Generally something like com.company.project.om. Torqueが生成したクラスを配置するJavaパッケージ。 たいていはcom.company.project.omのようなものです。
Directories and Paths ディレクトリとパス
torque.home . The base directory for the input and output of files.
ファイルのインプットとアウトプットのためのベースディレクトリ。
torque.templatePath templates The path relative to where Torque is being executed to load the Velocity templates from.
Velocityテンプレートをロードする、Torqueが実行されている場所からの相対パス。
torque.useClasspath false If true, Torque will not look in the templatePath directory, for templates, but instead load them from the classpath, allowing you to use Torque without extracting it from the jar.
もしtrueなら、TorqueはテンプレートをtemplatePathディレクトリを見ずにクラスパスからロードします。 これによって、jarを展開せずにTorqueを使うことができます。
torque.output.dir ${torque.home}/src The base directory for the output of SQL and Java files.
SQLやJavaファイルの出力のためのベースディレクトリ。
torque.schema.dir ${torque.home}/schema The base directory to reading *-schema.xml files from.
*-schema.xmlファイルを読み込むためのベースディレクトリ。
torque.doc.dir ${torque.output.dir}/doc The directory to place HTML documentation generated from the XML schema.
XMLスキーマから生成するHTMLドキュメントを配置するディレクトリ。
torque.java.dir ${torque.output.dir}/java The directory to place all of the generated Java code in.
すべての生成したJavaコードを配置するディレクトリ。
torque.javadoc.dir ${torque.output.dir}/javadoc The directory to javadocs generated from the Java om files.
Java omファイルから生成するjavadocのディレクトリ。
torque.ojb.dir ${torque.output.dir}/ojb The directory to place all of the generated OJB code in.
すべての生成したOJBコードを配置するディレクトリ。
Database Settings データベース設定
torque.database.createUrl N/A The JDBC URL that Torque can use to create and drop databases if instructed to do so. This is typically an administrative URL.
Torqueがデータベースの作成や削除を指示された時に使うことができるJDBCのURL。 通常は管理(admin)データベースのURLです。
torque.database.buildUrl N/A The JDBC URL that will be used to access yourdatabase. Torque can use this to create your tables if instructed to do so. This value should reflect the database name specified in the database schema file (described in the next section).
データベースにアクセスするために使われるJDBCのURL。 Torqueはテーブルを作成するように支持されたときにこれを使います。 この値は、データベーススキーマファイルで指定されたデータべース名に反映すべきです。 (次のセクションで説明)
(訳注:このページがTutorialの一部だったころの名残?「次のセクション」はTutorialのstep2のTorque Database Schemaのことだと思われる。)
torque.database.url N/A This should contain the same value as buildDatabaseURL. [not quite sure why both of these properties exist]
この値はbuildDatabaseURLと同じ値であるべきです。 [なぜ2つのプロパティが存在するかはまったく不明である]
torque.database.driver N/A The JDBC database driver to use when connecting to your database.
データベースに接続する時に使うJDBCデータベースドライバ。
torque.database.user N/A The administrative username that has sufficient privileges to create and drop databases and tables that Torque executes at build time.
ビルド時にTorqueが実行するデータベースやテーブルの作成、削除に対する十分な権限をもつ管理ユーザ名。
torque.database.password N/A The administrative password for the supplied username.
作成された管理ユーザ名に対するパスワード。
torque.database.host N/A The hostname or IP address of your database server.
データベースサーバのホスト名やIPアドレス。
torque.database.schema N/A Used by the JDBC -> XML process, and by the SQL Ant Task that will initialize your target database with the generated SQL. This is only used by Oracle at this time.
JDBC -> XMLの処理、及び、生成されたSQLによって対象のデータベースを初期化するAntのSQLタスクに使用されます。 現時点ではOracleの場合のみ使用されます。
torque.database.name N/A The database name to use in the datadump target.
datadumpターゲットで使われるデータベース名。
torque.database.manualCreation false When false, Torque can automatically execute the SQL to create your database tables via the create-db target. This will destroy old data, so manual creation is safer in non-dev environments.
falseの場合、Torqueは自動的にcreate-dbターゲットでデータベースを作成するSQLを実行します。 これは古いデータを破棄しますので、開発環境以外では手動で作成する方が安全です。
torque.sameJavaName false
Template Variables テンプレートの変数
torque.addGetByNameMethod true If true, Torque adds methods to get database fields by name/position.
trueの場合、Torqueはname/positionの形式でデータベースのフィールドを取得するメソッドを追加します。
torque.addIntakeRetrievable false If true, the data objects will implement Intake's Retrievable interface
trueの場合、データオブジェクトにIntakeのRetrievableインターフェイスを実装します。
torque.addSaveMethod true If true, Torque adds tracking code to determine how to save objects.
trueの場合、Torqueはオブジェクトを保存する方法を決定するためのトラッキングコードを追加します。
torque.addTimeStamp true If true, Torque true puts time stamps in generated om files.
trueの場合、Torqueは生成したomファイルにタイムスタンプを追加します。 ちなみに「Torque」の後の「true」は余計だ。
torque.basePrefix Base A string to pre-pend to the file names of base data and peer objects.
データオブジェクトとpeerオブジェクトのbaseクラスのファイル名の前の部分に付加する文字列。
torque.complexObjectModel true If true, Torque generates data objects with collection support and methods to easily retreive foreign key relationships. trueの場合、Torqueはコレクションをサポートするデータオブジェクトと関連する外部キーを簡単に照会するメソッドを生成します。
(誤 retreive → 正 retrieve)
torque.overloadKeySetters true If false, this prevents overloading of the setter method for primary/foreign keys. This is useful when working with broken JavaBean implementations. falseの場合、主キー/外部キーのsetterメソッドをオーバーロードをしないようにします。 これは、JavaBeanの実装に従っていないものと動かすときに便利です。
torque.useClasspath false If true, Torque will not look in the templatePath directory, for templates, but instead load them from the classpath, allowing you to use Torque without extracted it from the jar. trueの場合、TorqueはtemplatePathディレクトリを見ずにクラスパスからテンプレートを読み込みます。 これによってjarファイルを展開することなくTorqueを使うことができるようになります。
torque.useManagers false If true, Torque will generate Manager classes that use JCS for caching. Still considered experimental. trueの場合、TorqueはキャッシュのためにJCSを使う管理(Manager)クラスを生成します。 まだ実験段階と考えられています。
Misc. Settings 雑多な設定
torque.idTableXMLFile N/A
torque.doc.format html Possible values are html and anakia. 指定可能な値は、htmlとanakiaです。
torque.initialID 101 Controls where the idbroker starts id numbers at. IDブローカーが振るIDナンバーの最初の数をコントロールします。
Compile Settings コンパイルの設定
torque.compile.src.dir ${torque.java.dir} Where to read the Java om source files.
Java omファイルを読む場所。
torque.compile.build.dir bin/classes Where to put the compiled byte code for om classes.
omクラスのコンパイルされたバイトコードを配置する場所。
torque.compile.debug on Whether the om classes are compiled with debug code.
デバッグコードを含めてコンパイルする/しない
torque.compile.deprecation off Whether the om classes are compiled with deprecation allowed.
deprecation(非推奨)を許可してomクラスをコンパイルする/しない
torque.compile.optimize off Whether the om classes are optimized during compilation. コンパイル時にomクラスを最適化する/しない