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.apache.tapestry5.hibernate;
016    
017    /**
018     * Configuration symbols, for use with contributions to {@link org.apache.tapestry5.ioc.services.ApplicationDefaults}.
019     *
020     * @since 5.1.0.0
021     */
022    public class HibernateSymbols
023    {
024        /**
025         * If "true", then Hibernate will be started up at application launch, rather than lazily.
026         */
027        public static final String EARLY_START_UP = "tapestry.hibernate.early-startup";
028    
029        /**
030         * If true, then the last {@link org.apache.tapestry5.hibernate.HibernateConfigurer} will invoke {@link
031         * org.hibernate.cfg.Configuration#configure()}, to read the application's <code>hibernate.cfg.xml</code>. This
032         * should be set to false for applications that configure exclusively in code.
033         */
034        public static final String DEFAULT_CONFIGURATION = "tapestry.hibernate.default-configuration";
035    
036        /**
037         * If true (the default), then {@link org.apache.tapestry5.ValueEncoder}s are automatically created for each entity.
038         * Override to "false" to handle entity value encoding explicitly.
039         */
040        public static final String PROVIDE_ENTITY_VALUE_ENCODERS = "tapestry.hibernate.provide-entity-value-encoders";
041    
042        /**
043         * If true, then "entity" persistence strategy is used to store Hibernate entities as {@code Session State Objects}.
044         * 
045         * @since 5.2.0.0
046         */
047        public static final String ENTITY_SESSION_STATE_PERSISTENCE_STRATEGY_ENABLED = "tapestry.hibernate.entity-session-state-persistence-strategy-enabled";
048    }