src-trl/src/org/openbravo/translate/Translate_data.xsql
changeset 134 590ce3de05b4
parent 0 0247c26f10c6
child 1605 8a0fe0193bef
--- a/src-trl/src/org/openbravo/translate/Translate_data.xsql	Tue Nov 27 10:28:28 2007 +0000
+++ b/src-trl/src/org/openbravo/translate/Translate_data.xsql	Tue Nov 27 12:34:41 2007 +0000
@@ -54,8 +54,7 @@
     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
     <Sql>
         update ad_textinterfaces
-           set updated 	 = now(),
-               updatedby = 0
+           set isUsed = 'Y'
          where ad_textinterfaces_id = ( select min(A.ad_textinterfaces_id)
                                           from (select B.*
                                                 from (select min(ad_textinterfaces_id) AS ad_textinterfaces_id, 1 AS o
@@ -79,9 +78,9 @@
     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
     <Sql>
       insert into ad_textinterfaces
-        (AD_TEXTINTERFACES_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, TEXT, FILENAME)
+        (AD_TEXTINTERFACES_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, TEXT, FILENAME, ISUSED)
       values
-        (Ad_Get_Next_Sequence('AD_TextInterfaces',1),0 ,0, 'Y', now(), 0, now(), 0, ?, ?)
+        (Ad_Get_Next_Sequence('AD_TextInterfaces',1),0 ,0, 'Y', now(), 0, now(), 0, ?, ?, 'Y')
     </Sql>
     <Parameter name="text"/>
     <Parameter name="filename"/>
@@ -91,8 +90,7 @@
     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
     <Sql>
       update ad_textinterfaces
-         set updated 	 = now(),
-             updatedby = 0
+         set isUsed='Y'
        where ad_textinterfaces_id = ?
     </Sql>
     <Parameter name="adTextinterfacesId"/>
@@ -110,4 +108,12 @@
       SELECT AD_LANGUAGE AS NAME FROM AD_LANGUAGE WHERE ISACTIVE='Y' AND ISSYSTEMLANGUAGE='Y' AND ISBASELANGUAGE='N'
     </Sql>
   </SqlMethod>
+  
+  <SqlMethod name="clean" type="preparedStatement" return="rowCount">
+    <SqlMethodComment>Return the translation of a text</SqlMethodComment>
+    <Sql>
+      update ad_textinterfaces
+         set isUsed='N'
+    </Sql>
+  </SqlMethod>
 </SqlClass>