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