001: // .//GEN-BEGIN:1_be
002: /******************************************************
003: * Code Generated From JAFFA Framework Default Pattern
004: *
005: * The JAFFA Project can be found at http://jaffa.sourceforge.net
006: * and is available under the Lesser GNU Public License
007: ******************************************************/package org.jaffa.applications.test.modules.material.domain;
008:
009: import org.jaffa.metadata.*;
010: import java.util.*;
011:
012: // .//GEN-END:1_be
013: // Add additional imports//GEN-FIRST:imports
014:
015: // .//GEN-LAST:imports
016: // .//GEN-BEGIN:2_be
017: /** This class has the meta information for the Item persistent class.
018: */
019: public class ItemMeta {
020:
021: // domain-object class name
022: private static String m_name = "org.jaffa.applications.test.modules.material.domain.Item";
023:
024: // token to be used for getting the label for the domain-object
025: private static String m_labelToken = "[label.Test.Material.Item]";
026:
027: // Field constants
028: /** A constant to identity the ItemId field.*/
029: public static final String ITEM_ID = "ItemId";
030: /** A constant to identity the Sc field.*/
031: public static final String SC = "Sc";
032: /** A constant to identity the Part field.*/
033: public static final String PART = "Part";
034: /** A constant to identity the Serial field.*/
035: public static final String SERIAL = "Serial";
036: /** A constant to identity the Qty field.*/
037: public static final String QTY = "Qty";
038:
039: // Meta Data Definitions
040:
041: /** A constant which holds the meta information for the ItemId field.*/
042: public static final FieldMetaData META_ITEM_ID = new StringFieldMetaData(
043: ITEM_ID, "[label.Test.Material.Item.ItemId]", Boolean.TRUE,
044: null, new Integer(20), FieldMetaData.UPPER_CASE);
045:
046: /** A constant which holds the meta information for the Sc field.*/
047: public static final FieldMetaData META_SC = new StringFieldMetaData(
048: SC, "[label.Test.Material.Item.Sc]", Boolean.FALSE, null,
049: new Integer(20), FieldMetaData.UPPER_CASE);
050:
051: /** A constant which holds the meta information for the Part field.*/
052: public static final FieldMetaData META_PART = new StringFieldMetaData(
053: PART, "[label.Test.Material.Item.Part]", Boolean.FALSE,
054: null, new Integer(50), FieldMetaData.UPPER_CASE);
055:
056: /** A constant which holds the meta information for the Serial field.*/
057: public static final FieldMetaData META_SERIAL = new StringFieldMetaData(
058: SERIAL, "[label.Test.Material.Item.Serial]", Boolean.FALSE,
059: null, new Integer(20), FieldMetaData.UPPER_CASE);
060:
061: /** A constant which holds the meta information for the Qty field.*/
062: public static final FieldMetaData META_QTY = new DecimalFieldMetaData(
063: QTY, "[label.Test.Material.Item.Qty]", Boolean.FALSE, null,
064: null, null, new Integer(10), new Integer(5));
065:
066: // Map of FieldConstants + MetaDataDefinitions
067: private static Map m_fieldMap = new HashMap();
068: static {
069: m_fieldMap.put(ITEM_ID, META_ITEM_ID);
070: m_fieldMap.put(SC, META_SC);
071: m_fieldMap.put(PART, META_PART);
072: m_fieldMap.put(SERIAL, META_SERIAL);
073: m_fieldMap.put(QTY, META_QTY);
074: }
075:
076: /** Returns the name of the persistent class.
077: * @return the name of the persistent class.
078: */
079: public static String getName() {
080: return m_name;
081: }
082:
083: /** Getter for property labelToken.
084: * @return Value of property labelToken.
085: */
086: public static String getLabelToken() {
087: return m_labelToken;
088: }
089:
090: /** This returns an array of all the fields of the persistent class.
091: * @return an array of all the fields of the persistent class.
092: */
093: public static String[] getAttributes() {
094: return DomainMetaDataHelper.getAttributes(m_fieldMap);
095: }
096:
097: /** This returns an array of meta information for all the fields of the persistent class.
098: * @return an array of meta information for all the fields of the persistent class.
099: */
100: public static FieldMetaData[] getFieldMetaData() {
101: return DomainMetaDataHelper.getFieldMetaData(m_fieldMap);
102: }
103:
104: /** This returns meta information for the input field.
105: * @param fieldName the field name.
106: * @return meta information for the input field.
107: */
108: public static FieldMetaData getFieldMetaData(String fieldName) {
109: return DomainMetaDataHelper.getFieldMetaData(m_fieldMap,
110: fieldName);
111: }
112:
113: // .//GEN-END:2_be
114: // All the custom code goes here//GEN-FIRST:custom
115:
116: // .//GEN-LAST:custom
117: }
|