01: package com.xoetrope.carousel.langed;
02:
03: //import com.xoetrope.carousel.database.SQLField;
04: //import com.xoetrope.carousel.database.TableMapping;
05:
06: /**
07: * <p>Title: LanguageEditor</p>
08: * <p>Description: Language Resource Translation Utility</p>
09: * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
10: * the GNU Public License (GPL), please see license.txt for more details. If
11: * you make commercial use of this software you must purchase a commercial
12: * license from Xoetrope.</p>
13: * <p> $Revision: 1.4 $</p>
14: * @author Luan O'Carroll
15: */
16: public class LanguageObject //extends TableMapping
17: {
18: public static final int FIELD_ID = 0;//TableMapping.FIELD_ID;
19: public static final int FIELD_NAME = 1;
20: public static final int FIELD_CODE = 2;
21: public static final int FIELD_DESCRIPTION = 3;
22: public static final int NUM_FIELDS = 4;
23:
24: private static final LanguageObject prototype = new LanguageObject();
25:
26: // public String getName()
27: // {
28: // return getStringFieldValue( FIELD_NAME );
29: // }
30: //
31: // public long getId()
32: // {
33: // return getlongFieldValue( FIELD_ID );
34: // }
35: //
36: // public String getCode()
37: // {
38: // return getStringFieldValue( FIELD_CODE );
39: // }
40: //
41: // public String getDescription()
42: // {
43: // return getStringFieldValue( FIELD_DESCRIPTION );
44: // }
45: //
46: // public String validate( boolean forInsert )
47: // {
48: // String ret = null;
49: // if ( forInsert && ( getlongFieldValue( FIELD_ID ) != -1 ))
50: // ret += "The language ID has already been set !";
51: // else if ( getStringFieldValue( FIELD_NAME ).length() == 0 )
52: // ret += "The language name cannot be blank!";
53: // return ret;
54: // }
55: //
56: // private void getLanguage(long ID)
57: // {
58: // getObject( ID );
59: // }
60: //
61: // public LanguageObject()
62: // {
63: // }
64: //
65: // public LanguageObject(long _ID)
66: // {
67: // getObject( _ID );
68: // }
69: //
70: // public void configureTable()
71: // {
72: // tableName = ((( prototype == null ) || ( prototype.tableName == null )) ? "CS_LANGUAGES" : prototype.tableName );
73: //
74: //// addField( "ID", java.sql.Types.INTEGER ).setFieldOptions( SQLField.OPTION_INDEX | SQLField.OPTION_NOINSERT | SQLField.OPTION_NOUPDATE );
75: //
76: // addField( "Name" );
77: // addField( "Code" );
78: // addField( "Description" );
79: // }
80: //
81: // public static void setTableName( String name )
82: // {
83: // prototype.tableName = name;
84: // }
85: //
86: // public static final LanguageObject getPrototype()
87: // {
88: // return prototype;
89: // }
90: //
91: // public int getNumFields()
92: // {
93: // return NUM_FIELDS;
94: // }
95: }
|