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