001/* 002 * Copyright (c) 2008, 2009, 2011 Oracle, Inc. All rights reserved. 003 * 004 * This program and the accompanying materials are made available under the 005 * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 006 * which accompanies this distribution. The Eclipse Public License is available 007 * at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License 008 * is available at http://www.eclipse.org/org/documents/edl-v10.php. 009 */ 010package javax.persistence; 011 012import java.lang.annotation.Retention; 013import java.lang.annotation.Target; 014 015import static java.lang.annotation.ElementType.*; 016import static java.lang.annotation.RetentionPolicy.RUNTIME; 017 018/** 019 * Used to override mappings of multiple properties or fields. 020 * <p> 021 * <pre> 022 * 023 * Example: 024 * 025 * @Embedded 026 * @AttributeOverrides({ 027 * @AttributeOverride(name="startDate", 028 * column=@Column("EMP_START")), 029 * @AttributeOverride(name="endDate", 030 * column=@Column("EMP_END")) 031 * }) 032 * public EmploymentPeriod getEmploymentPeriod() { ... } 033 * 034 * </pre> 035 * 036 * @see AttributeOverride 037 * @since Java Persistence 1.0 038 */ 039@Target({TYPE, METHOD, FIELD}) 040@Retention(RUNTIME) 041 042public @interface AttributeOverrides { 043 044 /** 045 * (Required) One or more field or property mapping overrides. 046 */ 047 AttributeOverride[] value(); 048}