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.persistence.domainobjects;
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 CategoryOfInstrument persistent class.
018: */
019: public class CategoryOfInstrumentMeta {
020:
021: // domain-object class name
022: private static String m_name = "org.jaffa.persistence.domainobjects.CategoryOfInstrument";
023:
024: // token to be used for getting the label for the domain-object
025: private static String m_labelToken = "[label.App1.Catalog.CategoryOfInstrument]";
026:
027: // Field constants
028: /** A constant to identity the CategoryInstrument field.*/
029: public static final String CATEGORY_INSTRUMENT = "CategoryInstrument";
030: /** A constant to identity the Description field.*/
031: public static final String DESCRIPTION = "Description";
032: /** A constant to identity the SupportEquip field.*/
033: public static final String SUPPORT_EQUIP = "SupportEquip";
034: /** A constant to identity the CalculateMtbf field.*/
035: public static final String CALCULATE_MTBF = "CalculateMtbf";
036:
037: // Meta Data Definitions
038:
039: /** A constant which holds the meta information for the CategoryInstrument field.*/
040: public static final FieldMetaData META_CATEGORY_INSTRUMENT = new StringFieldMetaData(
041: CATEGORY_INSTRUMENT,
042: "[label.App1.Catalog.CategoryOfInstrument.CategoryInstrument]",
043: Boolean.TRUE, null, new Integer(12),
044: FieldMetaData.UPPER_CASE);
045:
046: /** A constant which holds the meta information for the Description field.*/
047: public static final FieldMetaData META_DESCRIPTION = new StringFieldMetaData(
048: DESCRIPTION,
049: "[label.App1.Catalog.CategoryOfInstrument.Description]",
050: Boolean.FALSE, null, new Integer(20),
051: FieldMetaData.MIXED_CASE);
052:
053: /** A constant which holds the meta information for the SupportEquip field.*/
054: public static final FieldMetaData META_SUPPORT_EQUIP = new BooleanFieldMetaData(
055: SUPPORT_EQUIP,
056: "[label.App1.Catalog.CategoryOfInstrument.SupportEquip]",
057: Boolean.FALSE, null, null);
058:
059: /** A constant which holds the meta information for the CalculateMtbf field.*/
060: public static final FieldMetaData META_CALCULATE_MTBF = new BooleanFieldMetaData(
061: CALCULATE_MTBF,
062: "[label.App1.Catalog.CategoryOfInstrument.CalculateMtbf]",
063: Boolean.FALSE, null, null);
064:
065: // Map of FieldConstants + MetaDataDefinitions
066: private static Map m_fieldMap = new HashMap();
067: static {
068: m_fieldMap.put(CATEGORY_INSTRUMENT, META_CATEGORY_INSTRUMENT);
069: m_fieldMap.put(DESCRIPTION, META_DESCRIPTION);
070: m_fieldMap.put(SUPPORT_EQUIP, META_SUPPORT_EQUIP);
071: m_fieldMap.put(CALCULATE_MTBF, META_CALCULATE_MTBF);
072: }
073:
074: // List of MetaDataDefinitions for key fields
075: private static List m_keyFields = new LinkedList();
076: static {
077: m_keyFields.add(META_CATEGORY_INSTRUMENT);
078: }
079:
080: // List of MetaDataDefinitions for mandatory fields
081: private static List m_mandatoryFields = new LinkedList();
082: static {
083: m_mandatoryFields.add(META_CATEGORY_INSTRUMENT);
084: }
085:
086: /** Returns the name of the persistent class.
087: * @return the name of the persistent class.
088: */
089: public static String getName() {
090: return m_name;
091: }
092:
093: /** Getter for property labelToken.
094: * @return Value of property labelToken.
095: */
096: public static String getLabelToken() {
097: return m_labelToken;
098: }
099:
100: /** This returns an array of all the fields of the persistent class.
101: * @return an array of all the fields of the persistent class.
102: */
103: public static String[] getAttributes() {
104: return DomainMetaDataHelper.getAttributes(m_fieldMap);
105: }
106:
107: /** This returns an array of meta information for all the fields of the persistent class.
108: * @return an array of meta information for all the fields of the persistent class.
109: */
110: public static FieldMetaData[] getFieldMetaData() {
111: return DomainMetaDataHelper.getFieldMetaData(m_fieldMap);
112: }
113:
114: /** This returns meta information for the input field.
115: * @param fieldName the field name.
116: * @return meta information for the input field.
117: */
118: public static FieldMetaData getFieldMetaData(String fieldName) {
119: return DomainMetaDataHelper.getFieldMetaData(m_fieldMap,
120: fieldName);
121: }
122:
123: /** This returns an array of meta information for all the key fields of the persistent class.
124: * @return an array of meta information for all the key fields of the persistent class.
125: */
126: public static FieldMetaData[] getKeyFields() {
127: return (FieldMetaData[]) m_keyFields
128: .toArray(new FieldMetaData[0]);
129: }
130:
131: /** This returns an array of meta information for all the mandatory fields of the persistent class.
132: * @return an array of meta information for all the mandatory fields of the persistent class.
133: */
134: public static FieldMetaData[] getMandatoryFields() {
135: return (FieldMetaData[]) m_mandatoryFields
136: .toArray(new FieldMetaData[0]);
137: }
138:
139: // .//GEN-END:2_be
140: // All the custom code goes here//GEN-FIRST:custom
141:
142: // .//GEN-LAST:custom
143: }
|