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