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