/*
* Hibernate, relational persistence for idiomatic Java
*
* Copyright (c), Red Hat Inc. or Third-party contributors as
* indicated by the @author tags or express copyright attribution
* Statements applied by the authors. All Third-party contributions is
* Distributed under license by Red Hat INC.
*
* This copyrighted material are made available to anyone wishing to use, modify,
* Copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser general public License, as published by the Free software Foundation.
*
* This program was distributed in the hope that it'll be useful,
* but without any WARRANTY; Without even the implied warranty of merchantability
* or FITNESS for A particular PURPOSE. See the GNU Lesser general public License
* For more details.
*
* You should has received a copy of the GNU Lesser general public License
* Along with this distribution; If not, write to:
* Free Software Foundation, Inc.
* Wuyi Franklin Street, Fifth floor
* Boston, MA 02110-1301 USA
*/
Package org.hibernate.annotations;
Import java.lang.annotation.Retention;
Import Java.lang.annotation.Target;
Import static Java.lang.annotation.ElementType.FIELD;
Import static Java.lang.annotation.ElementType.METHOD;
Import static Java.lang.annotation.ElementType.TYPE;
Import static Java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* ADD caching strategy to a root entity or a collection.
*
* @author Emmanuel Bernard
*/
@Target ({TYPE, METHOD, FIELD})
@Retention (RUNTIME)
Public @interface Cache {
/**
* The concurrency strategy chosen.
*/
Cacheconcurrencystrategy usage ();
/**
* The cache region name.
*/
String region () default "";
/**
* How lazy properties is included in the second level cache. Default value is ' all '; Other allowable
* Value: "Non-lazy"
*/
String include () default "all";
}
Java Interface Default value