java interface 默认值
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2010, 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 are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is 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 is distributed in the hope that it will 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 have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 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 are included in the second level cache. Default value is "all"; other allowable
* value: "non-lazy"
*/
String include() default "all";
}
java interface 默认值的更多相关文章
- java 注解默认值
package com.zejian.annotationdemo; import java.lang.annotation.ElementType; import java.lang.annotat ...
- java 8种基本数据类型的默认值及所占字节数
通过一段代码来测试一下 8种基本数据类型的默认值 package dierge; public class Ceshi { int a; double b; boolean c; char d; fl ...
- java函数参数默认值
java函数参数默认值 今天,需要设定java函数参数的默认值,发现按照其它语言中的方法行不通 java中似乎只能通过函数的重载来实现 函数参数默认代码
- java 反射: 当Timestamp类型的属性值为null时,设置默认值
import java.beans.PropertyDescriptor; import java.lang.reflect.Field; import java.lang.reflect.Metho ...
- Java中boolean型变量的默认值问题
1.首先分析Java中的三种不同变量的区别,如下表所示 概念 默认值 其他 类变量 也叫静态变量,是类中独立于方法之外的变量 用static 修饰 有默认初始值,系统自动初始化. 如boolean ...
- java 常用基本数据类型的默认值
在使用基本数据类型作为类成员的时候,有时只初始化了而没有给变量赋值,那么此时,java会给你的变量赋一个默认初始值. boolean false char '/ ...
- Java成员变量默认值
Java中明确规定:1.如果是引用型的,比如:String,还有类对象,他们的默认值都是:null:2.而如果是值类型:double,int,long,float,char等等,他们都是:0:还有一个 ...
- (转载)JAVA中八种基本数据类型的默认值
原文链接: http://simon-c.iteye.com/blog/1016031 引用 For type byte, the default value is zero, that is, th ...
- java 基本数据类型初始值(默认值)
1.int类型定义的数组,初始化默认是0 2.String类型定义的数组,默认值是null 3.char类型定义的数组,默认值是0对应的字符 4.double类型定义的数组,默认值是0.0 5.flo ...
随机推荐
- oracle linux dtrace
http://docs.oracle.com/cd/E37670_01/E38608/html/pref.html
- Android Studio 怎样打JAR包
Android Studio 怎样打JAR包 在eclipse中我们知道怎样将一个项目导出为jar包,供其他项目使用. 在AS中能够通过改动gradle才处理. 我们新建一个项目MakeJar,在项目 ...
- ASP.NET MVC中商品模块小样
在前面的几篇文章中,已经在控制台和界面实现了属性值的笛卡尔乘积,这是商品模块中的一个难点.本篇就来实现在ASP.NET MVC4下商品模块的一个小样.与本篇相关的文章包括: 1.ASP.NET MVC ...
- 如何修改Mac截屏保存路径
MAC OS X系统默认的截图路径是桌面文件夹,默认的截图格式是 PNG 图片格式,如何自定义设置呢? 截图保存路径 打开终端(Terminal)并输入如下命令: defaults write com ...
- C#编程(六十七)----------LINQ提供程序
原文链接:http://blog.csdn.net/shanyongxu/article/details/47257511 LINQ提供程序 .NET3.5包含了几个LINQ提供程序. LINQ提供程 ...
- 警告 7 隐藏了继承的成员。如果是有意隐藏,请使用关键字 new
public new bool Print(string 承包方编码, MapPrint.My2Progress pMy2Progress, bool Label2ZJ)
- cocos2d-x CC_SYNTHESIZE_READONLY
//定义一个只读属性Label,在类定义中可以使用this->getLabel来访问 CC_SYNTHESIZE_READONLY(cocos2d::CCLabelTTF*,_label ...
- win7凭据管理、win7多用户远程登录、主机头设置、nuget.org无法访问
前言 最近遇到的几个问题,然后处理在此对处理方式进行记录一下. 1.服务器共享文件夹,在本机进行访问登录时,每次登录或者每次开机进入都要进行登录的权限认证,这样很麻烦. 2.服务器难免会有多用户同时 ...
- [Web 前端] td长度固定,内容过长,超过部分用省略号代替
cp from : https://blog.csdn.net/bsh_csn/article/details/51829103 html的table表格中td长度固定,当内容过长时,超过部分用省略号 ...
- PHP: Short URL Algorithm Implementation
1.http://www.snippetit.com/2009/04/php-short-url-algorithm-implementation/ The following code is wri ...