FileDocCategorySizeDatePackage
CMPROTemplateFormatter.javaAPI DocGlassfish v2 API7256Fri May 04 22:34:48 BST 2007com.sun.jdo.spi.persistence.support.ejb.ejbc

CMPROTemplateFormatter

public class CMPROTemplateFormatter extends Object

Fields Summary
private static final String
templateFile
public static final String
updateNotAllowed_
public static final String
accessNotAllowed_
public static final String
loadNonDFG_
public static final String
jdoGetPersistenceManagerByPK_
public static Properties
helpers
public static MessageFormat
privatetransientvformatter
public static MessageFormat
giformatter
public static MessageFormat
jdolookuppmfformatter
public static MessageFormat
ejb__refreshformatter
public static MessageFormat
loadNonDFGformatter
public static String
privateStaticFinalVariablesTemplate
public static String
signatureTemplate
public static String
updateNotAllowedTemplate
public static String
accessNotAllowedTemplate
public static String
jdoCleanAllRefsTemplate
public static String[]
jdoGetPersistenceManagerBody
public static String[]
jdoGetPersistenceManager0Body
public static String[]
jdoReleasePersistenceManager0Body
public static String[]
jdoGetPersistenceManagerByPKBody
public static String[]
jdoClosePersistenceManagerBody
Constructors Summary
CMPROTemplateFormatter()
Constructs a new CMPROTemplateFormatter instance.


              
     
    
Methods Summary
private static voidinitFormatters()
Initializes MessageFormats for code generation.

        // variables
        privatetransientvformatter = new MessageFormat(helpers.getProperty(
                CMPTemplateFormatter.privateTransientVariables_));

        // methods
        giformatter = new MessageFormat(helpers.getProperty(
                CMPTemplateFormatter.getInstance_));
        jdolookuppmfformatter = new MessageFormat(helpers.getProperty(
                CMPTemplateFormatter.jdoLookupPersistenceManagerFactory_));
        ejb__refreshformatter = new MessageFormat(helpers.getProperty(
                CMPTemplateFormatter.ejb__refresh_));
        loadNonDFGformatter = new MessageFormat(helpers.getProperty(loadNonDFG_));
    
static synchronized voidinitHelpers()
Initializes templates for code generation.

        if (helpers == null) {
            helpers = new Properties();
            CMPTemplateFormatter.loadProperties(helpers, templateFile);

            initFormatters();
            initTemplates();
        }
    
private static voidinitTemplates()
Initializes standard templates for code generation.

        privateStaticFinalVariablesTemplate = helpers.getProperty(
                CMPTemplateFormatter.privateStaticFinalVariables_);
        signatureTemplate = helpers.getProperty(CMPTemplateFormatter.signature_);
        updateNotAllowedTemplate = helpers.getProperty(updateNotAllowed_);
        accessNotAllowedTemplate = helpers.getProperty(accessNotAllowed_);
        jdoCleanAllRefsTemplate = helpers.getProperty(CMPTemplateFormatter.jdoCleanAllRefs_);

        jdoGetPersistenceManagerBody = CMPTemplateFormatter.getBodyAsStrings(
                helpers.getProperty(CMPTemplateFormatter.jdoGetPersistenceManager_));
        jdoGetPersistenceManager0Body = CMPTemplateFormatter.getBodyAsStrings(
                helpers.getProperty(CMPTemplateFormatter.jdoGetPersistenceManager0_));
        jdoGetPersistenceManagerByPKBody = CMPTemplateFormatter.getBodyAsStrings(
                helpers.getProperty(jdoGetPersistenceManagerByPK_));
        jdoClosePersistenceManagerBody = CMPTemplateFormatter.getBodyAsStrings(
                helpers.getProperty(CMPTemplateFormatter.jdoClosePersistenceManager_));
        jdoReleasePersistenceManager0Body = CMPTemplateFormatter.getBodyAsStrings(
                helpers.getProperty(CMPTemplateFormatter.jdoReleasePersistenceManager0_));