001    // Copyright 2009 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    //     http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.tynamo.jpa;
016    
017    /**
018     * Configuration symbols, for use with contributions to
019     * {@link org.apache.tapestry5.ioc.services.ApplicationDefaults}.
020     * 
021     * @since 5.1.0.0
022     */
023    public class JPASymbols
024    {
025            /**
026             * If "true", then Hibernate will be started up at application launch, rather than lazily.
027             */
028            public static final String EARLY_START_UP = "tapestry.jpa.early-startup";
029    
030            /**
031             * If true, then the last {@link org.apache.tapestry5.hibernate.HibernateConfigurer} will invoke
032             * {@link org.hibernate.cfg.Configuration#configure()}, to read the application's
033             * <code>hibernate.cfg.xml</code>. This should be set to false for applications that configure
034             * exclusively in code.
035             */
036            public static final String DEFAULT_CONFIGURATION = "tapestry.jpa.default-configuration";
037    
038            /**
039             * If true (the default), then {@link org.apache.tapestry5.ValueEncoder}s are automatically
040             * created for each entity. Override to "false" to handle entity value encoding explicitly.
041             */
042            public static final String PROVIDE_ENTITY_VALUE_ENCODERS = "tapestry.jpa.provide-entity-value-encoders";
043    
044            public static final String PERSISTENCE_UNIT = "tapestry.jpa.persistence-unit";
045    }