| Home >> All >> org >> apache >> [ torque Javadoc ] |
Page 1 2
org.apache.torque: Javadoc index of package org.apache.torque.
Package Samples:
org.apache.torque.engine.database.model
org.apache.torque.engine.database.transform
org.apache.torque.engine
org.apache.torque.engine.sql
org.apache.torque.task
org.apache.torque.engine.database
org.apache.torque.adapter
org.apache.torque.avalon
org.apache.torque.dsfactory
org.apache.torque.manager
org.apache.torque.map
org.apache.torque.oid
org.apache.torque.om
org.apache.torque.pool
Classes:
LargeSelect: This class can be used to retrieve a large result set from a database query. The query is started and then rows are returned a page at a time. The LargeSelect is meant to be placed into the Session or User.Temp, so that it can be used in response to several related requests. Note that in order to use LargeSelect you need to be willing to accept the fact that the result set may become inconsistent with the database if updates are processed subsequent to the queries being executed. Specifying a memory page limit of 1 will give you a consistent view of the records but the totals may not be accurate ...
TypeMap: A class that maps JDBC types to their corresponding Java object types, and Java native types. Used by Column.java to perform object/native mappings. These are the official SQL type to Java type mappings. These don't quite correspond to the way the peer system works so we'll have to make some adjustments. ------------------------------------------------------- SQL Type | Java Type | Peer Type ------------------------------------------------------- CHAR | String | String VARCHAR | String | String LONGVARCHAR | String | String NUMERIC | java.math.BigDecimal | java.math.BigDecimal DECIMAL | java.math.BigDecimal ...
IDBroker: This method of ID generation is used to ensure that code is more database independent. For example, MySQL has an auto-increment feature while Oracle uses sequences. It caches several ids to avoid needing a Connection for every request. This class uses the table ID_TABLE defined in conf/master/id-table-schema.xml. The columns in ID_TABLE are used as follows: ID_TABLE_ID - The PK for this row (any unique int). TABLE_NAME - The name of the table you want ids for. NEXT_ID - The next id returned by IDBroker when it queries the database (not when it returns an id from memory). QUANTITY - The number of ...
DB: DB defines the interface for a Torque database adapter. Support for new databases is added by subclassing DB and implementing its abstract interface, and by registering the new database adapter and its corresponding JDBC driver in the service configuration file. The Torque database adapters exist to present a uniform interface to database access across all available databases. Once the necessary adapters have been written and configured, transparent swapping of databases is theoretically supported with zero code changes and minimal configuration file modifications. Torque uses the driver class ...
TorqueRuntimeException: This is a base class of runtime exeptions thrown by Torque. This class represents a non-checked type exception (see java.lang.RuntimeException ). It is intended to ease the debugging by carrying on the information about the exception which was caught and provoked throwing the current exception. Catching and rethrowing may occur multiple times, and provided that all exceptions except the first one are descendands of TorqueRuntimeException , when the exception is finally printed out using any of the printStackTrace() methods, the stacktrace will contain the information about all exceptions thrown ...
Transaction: Refactored begin/commit/rollback transaction methods away from the BasePeer . This can be used to handle cases where transaction support is optional. The second parameter of beginOptionalTransaction will determine with a transaction is used or not. If a transaction is not used, the commit and rollback methods do not have any effect. Instead it simply makes the logic easier to follow by cutting down on the if statements based solely on whether a transaction is needed or not.
NameFactoryTest: Unit tests for class NameFactory and known NameGenerator implementations. To add more tests, add entries to the ALGORITHMS , INPUTS , and OUTPUTS arrays, and code to the makeInputs() method. This test assumes that it's being run using the MySQL database adapter, DBMM . MySQL has a column length limit of 64 characters.
Torque: A static facade wrapper around the Torque implementation (which is in TorqueInstance ). For historical reasons this class also contains a thin object which can be used to configure Torque with the Stratum Lifecycle. This is deprecated and will be removed in the future in favour of using Torque as an Avalon Component.
DBMM: This is used in order to connect to a MySQL database using the MM drivers. Simply comment the above and uncomment this code below and fill in the appropriate values for DB_NAME, DB_HOST, DB_USER, DB_PASS. http://www.worldserver.com/mm.mysql/ "jdbc:mysql://" + DB_HOST + "/" + DB_NAME + "?user=" + DB_USER + "&password=" + DB_PASS;
BasePeer: This is the base class for all Peer classes in the system. Peer classes are responsible for isolating all of the database access for a specific business object. They execute all of the SQL against the database. Over time this class has grown to include utility methods which ease execution of cross-database queries and the implementation of concrete Peers.
IdGenerator: Interface to be implemented by id generators. It is possible that some implementations might not require all the arguments, for example MySQL will not require a keyInfo Object, while the IDBroker implementation does not require a Connection as it only rarely needs one and retrieves a connection from the Connection pool service only when needed.
SqlExpression: This class represents a part of an SQL query found in the WHERE section. For example: table_a.column_a = table_b.column_a column LIKE 'F%' table.column This class is used primarily by BasePeer .
TorqueInstance: The core of Torque's implementation. Both the classic Torque static wrapper and the org.apache.torque.avalon.TorqueComponent Avalon implementation leverage this class.
Criteria: This is a utility class that is used for retrieving different types of values from a hashtable based on a simple name string. This class is meant to minimize the amount of casting that needs to be done when working with Hashtables. NOTE: other methods will be added as needed and as time permits.
Unique: Information about unique columns of a table. This class assumes that in the underlying RDBMS, unique constraints and unique indices are roughly equivalent. For example, adding a unique constraint to a column also creates an index on that column (this is known to be true for MySQL and Oracle).
JndiDataSourceFactory: A factory that looks up the DataSource from JNDI. It is also able to deploy the DataSource based on properties found in the configuration. This factory tries to avoid excessive context lookups to improve speed. The time between two lookups can be configured. The default is 0 (no cache).
Query: Used to assemble an SQL SELECT query. Attributes exist for the sections of a SELECT: modifiers, columns, from clause, where clause, and order by clause. The various parts of the query are appended to buffers which only accept unique entries. This class is used primarily by BasePeer.
DBSybase: This is used to connect to a Sybase database using Sybase's JConnect JDBC driver. NOTE: Currently JConnect does not implement the required methods for ResultSetMetaData, and therefore the village API's may not function. For connection pooling, everything works.
DBMSSQL: This is used to connect to a MSSQL database. For now, this class simply extends the adaptor for Sybase. You can use one of several commercial JDBC drivers; the one I use is: i-net SPRINTA(tm) 2000 Driver Version 3.03 for MS SQL Server http://www.inetsoftware.de/
TorqueDataModelTask: A base torque task that uses either a single XML schema representing a data model, or a <fileset> of XML schemas. We are making the assumption that an XML schema representing a data model contains tables for a single database.
MapBuilder: MapBuilders are wrappers around DatabaseMaps. You use a MapBuilder to populate a DatabaseMap. You should implement this interface to create your own MapBuilders. The MapBuilder interface exists to support ease of casting.
SQLToAppData: A Class that converts an sql input file to an AppData structure. The class makes use of SQL Scanner to get sql tokens and the parses these to create the AppData class. SQLToAppData is in effect a simplified sql parser.
ObjectKey: This class can be used to uniquely identify an object within an application. There are four subclasses: StringKey, NumberKey, and DateKey, and ComboKey which is a Key made up of a combination ofthe first three.
| Home | Contact Us | Privacy Policy | Terms of Service |