Questions tagged [apache-torque]

Apache Torque is a sub project of the Apache Software Foundation Database Project. It is an object-relational mapper for Java. Torque lets you access and manipulate data in a relational database using Java objects.

Apache Torque is a sub project of the Apache Software Foundation Database Project. It is an object-relational mapper for Java. Torque lets you access and manipulate data in a relational database using Java objects.

Unlike most other object-relational mappers, Torque does not use reflection to access user-provided classes, but it generates the necessary classes (including the Data Objects) from an XML document and DTD describing the database schema (which can either be written by hand or generated from an existing database).

The same documents can also be used to generate and execute a script which creates all the tables in the database. These generation steps are performed through the Velocity templating engine.

See also

18 questions
8
votes
6 answers

What's the easiest way to persist java objects?

Right now I have java program whose classes are currently POJOs and stored in volatile memory. These need to be persisted. As I understand it two popular choices are JDO and the Java Persistence API. For someone who know little about SQL, Torque,…
James
  • 5,273
  • 10
  • 51
  • 76
5
votes
2 answers

Hibernate vs. Apache Torque

Can anybody provide detailed advantages and disadvantages of each ORM? First of all I'm interested in things that Hibernate provides, and Torquay not.
Pavel Vyazankin
  • 1,470
  • 6
  • 18
  • 27
3
votes
2 answers

Generating schema files with torque 4

Has torque 4 lost the ability to generate schema files from a live database? In torque 3 you could use "maven torque:jdbc" to generate the schema from the database which was nice, but it looks like torque 4 have lost that ability. So do I have to…
MTilsted
  • 5,425
  • 9
  • 44
  • 76
3
votes
1 answer

entry point for apache torque project

I've a project that contains webroot folder name war and contains a structure like but it doesn't contains a web.xml like other common entry point for web projects.How i start this torque project?What is the entry point for torques web project? my…
Devendra
  • 1,864
  • 6
  • 29
  • 49
2
votes
1 answer

Set transaction isolation level in torque

How do I set the transaction isolation level for a specific transaction when using torque? My problem may be that I am using the org.apache.torque.util.Transaction class like this: Connection con=Transaction.begin(); // Use…
MTilsted
  • 5,425
  • 9
  • 44
  • 76
2
votes
0 answers

Converting Multiple Images to Byte Array

i trying to give responce as multiple images byte array to another application. I get the vehicle images list from database and convert to byte array. ByteArrayInputStream instream = null; ServletOutputStream out = null ; for(Vehicle vehicle :…
Siva
  • 457
  • 4
  • 17
2
votes
1 answer

How to define project structure correctly when dealing with torque

I have my maven file defined as follows to generate source code from apache torque. org.apache.torque torque-maven-plugin 4.0-beta1
Saurabh Kumar
  • 16,353
  • 49
  • 133
  • 212
1
vote
1 answer

Delete all rows in database using struts and torque

I need to delete a more than one row in database. The data is in Tariff table which include another table's (vehicle) primary key. Suppose if I delete a vehicle table data, the data which one is related to that particular id in tariff table also is…
Siva
  • 457
  • 4
  • 17
1
vote
1 answer

build failed while run ant file

I'm trying to run ant build.xml but some error occur Buildfile: D:\Projects\OBSWorkspace\schoolforms\torque\build.xml main: BUILD FAILED D:\Projects\OBSWorkspace\schoolforms\torque\build.xml:19: The following error occurred while executing this…
Devendra
  • 1,864
  • 6
  • 29
  • 49
1
vote
3 answers

presentation layer to go with apache torque

I'm planning on using Apache torque as my object-relational mapper (ORM), and I was wondering if anybody has any suggestions around what framework to use for presentation layer with torque. maybe Spring? I don't know if this helps, but my…
ed1t
  • 8,719
  • 17
  • 67
  • 110
0
votes
1 answer

Select a group of records at a time based on them having same value in a particular column

I want to be able to use a single query to select all records out of a table having the same value in a particular column. Clarification Conditions: - document_id is not a primary key. List ids = SELECT DISTINCT T.document_id FROM table T; List…
0
votes
1 answer

MySQL: Insert 25,000,000 codes into table

I've got 25,000,000 codes (each code has 8 random literals) to insert into my database. We're running with MySQL and Apache Torque as ORM. My table simplified looks like this: table_code id BIGINT, Primary Key (no auto-increment, bc of ORM) code…
Remo
  • 1,112
  • 2
  • 12
  • 25
0
votes
4 answers

Apache Torque Criteria: how to join a subquery

Let's say I have the follow SQL statement. I would like to convert this to Torque Criteria: SELECT table.name, subq1.total AS 'TOTAL', subq2.total2 AS 'SECOND TOTAL' FROM table LEFT JOIN ( SELECT c.login, COUNT(*) AS 'total' FROM table2…
bluefoot
  • 10,220
  • 11
  • 43
  • 56
0
votes
1 answer

Jruby (1.7.5) + MSSQL-2012 + torquebox 2.2.0 DB issue

I have Jruby on rails Jruby (1.7.5) + MSSQL-2012 + torquebox 2.2.0 + Rails-2.3.18. The application got connected to the database without any problem. I am installed active-recorder-jdbc (1.2.8) * active-record-mssql-jdbc (2.8.1) The issue is If…
palani
  • 4,661
  • 8
  • 31
  • 36
0
votes
1 answer

Cartodb torque map. Adding additional layers

Would appreciate any help with adding a second layer to my torque map in cartodb using createlayer. Sorry I'm obviously just learning and know just enough to be dangerous the following is a bootstrap page I'm messing with. Zombie Outbreak ;) Thanks…
Ryan Key
  • 1
  • 1
1
2